I have added this code for presenting a UIActivityViewController
:
-(IBAction)activityAction:(id)sender
{
UIActivityViewController *activityViewController = [[UIActivityViewController alloc]initWithActivityItems:[NSArray arrayWithObjects:@"Hello Welcome!",[UIImage imageNamed:@"scene3.jpg"],nil] applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypePostToFacebook, UIActivityTypePostToTwitter, UIActivityTypePostToWeibo, UIActivityTypeAssignToContact];
[self presentViewController:activityViewController animated:YES completion:nil];
}
Facebook, Twitter and Weibo icons are not showing in iOS7. In iOS6, all the icons are showing correctly. See the screenshot below:
How can I solve this?
You're probably not logged in to Facebook or Twitter in the devices Settings. They won't show up here unless the user is logged in. File a bug with Apple.
Look at the name of the property excludedActivityTypes
, you are excluding facebook, twitter, ...
activityViewController.excludedActivityTypes = @[UIActivityTypePostToWeibo, UIActivityTypeAssignToContact];
excludes only Weibo and Assign to contact
Make sure that you don't exclude the Activities that you want to use. So, remove "UIActivityTypePostToFacebook" & "UIActivityTypePostToTwitter" from "activityViewController.excludedActivityTypes" object.
Also, Make sure that you are logged in into Facebook and Twitter accounts in order to post on respective social platform.
Please note that this is working on simulator and real devices.
Hope this helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With