2

For Share sheet for my iOS app. As I referred in this link How to display the default iOS 6 share action sheet with available share options?.

And I end up with below working code :

NSString *string = @"Some text to share";
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[string]
                                  applicationActivities:nil];

[self presentViewController:activityViewController
                                   animated:YES
                                 completion:^{
                                     NSLog(@"complerted.");
                                 }];

But I can see only Email & Message button !!?

enter image description here

How can I get other social media buttons in Share sheet like Facebook , twitter as seen below. Even though user account not available/created in device? (As we can see iOS default Photos app, where the share sheet has social buttons even though for example facebook not installed in the device!) Should I enable or extend extension?

enter image description here

Please help, Thanks & Regards,

//Update - I added iOS-8 social framework and imported #import <Social/Social.h>.

Community
  • 1
  • 1
byJeevan
  • 3,728
  • 3
  • 37
  • 60

2 Answers2

2

This UIactivityController show the app which can share your string or image. If you have not added any Facebook or twitter account than that will not show that app in this action sheet.

Try by adding Facebook and twitter account in your devices setting. you will able to see that app too.

Esha
  • 1,328
  • 13
  • 34
  • Thanks for the reply. But I added Twitter account, but still not showing here and also in `Activities`. Interestingly, we can see all expected share buttons in Apple `Photos` App.[even though I don't have facebook installed in the device it shows up in share sheet!] So, how can I achieve the same.? – byJeevan Nov 19 '14 at 06:53
0

You have a More button in your share sheet. Tap on it & it will shows all the available Extension & turn on it for Facebook & Twitter.

Meenakshi
  • 1,162
  • 9
  • 13