I am trying to use UIActivityViewController to share on facebook. When I am using the
UIImage* image = [UIImage imageNamed:@"image1.png"];
NSArray* dataToShare = @[@"test",image];
UIActivityViewController* activityViewController =
[[UIActivityViewController alloc] initWithActivityItems:dataToShare
applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll];
I can't see the "Share on Facebook" icon although I didn't exclude "UIActivityTypePostToFacebook". isn't there a predefined UIActivity for facebook ?
Thanks
Try this: if you want only facebook icon to share:
//in the list of excluded activity type insert any other kind of activitytypes you want to exclude
you must be logged in your iphone settings: Settings -> facebook