iosfacebookuiactivity

What's the difference between these two UIActivityType for Facebook sharing?


When I share contents via Facebook in the iOS application, inside the method

- (id)activityViewController:(UIActivityViewController *)activityViewController itemForActivityType:(NSString *)activityType

the activityType is com.facebook.Facebook.ShareExtension for some devices, and com.apple.UIKit.activity.PostToFacebook for other devices.

When do I expect to see each of them? The Facebook app is installed for each device I tested.


Solution

  • It looks like com.facebook.Facebook.ShareExtension refers to... the Facebook Application Share extension.

    com.apple.UIKit.activity.PostToFacebook seems to refer to Apple's integrated Facebook Sharing UI.

    In conclusion, the first one comes from someone who is selecting Facebook when trying to share (Let's say they open the Photos app, select a photo, tap on the Share button on the lower left part of the screen and then tap on the Facebook Application icon), and the other when someone is trying to Share using Apple's implementation of the Share Dialog. I used this URL to understand this better.