In my iOS app, I have a Facebook share button, which opens up a FBSDKShareDialog:
-(IBAction)post:(id)sender{
FBSDKShareLinkContent *content = [[FBSDKShareL
The solution is to check in the delegate method sharer:didCompleteWithResults:
if user has Facebook installed as @Adam Eisfeld suggested :
- (void)sharer:(id)sharer didCompleteWithResults:(NSDictionary *)results{
// check if user has facebook app installed
NSURL *fbURL = [NSURL URLWithString:@"fb://"];
// there is no facebook app installed
if (![[UIApplication sharedApplication] canOpenURL:fbURL]){
// facebook is not intalled check the keys
if (results.allKeys.count !=0){
// success you can get your post ID
}else {
// if resutlst.allKeys == 0 means user press Done button
}
} else {
// the share is successfully and facebook is installed
}
}
and from iOS9.0 do not forget to add in your .plist file LSApplicationQueriesSchemes
key (an array of strings) and add fb
check this post for more details.