Note that there are some explanatory texts on larger screens.

plurals
  1. PODetect successful facebook post using FBDialogs
    text
    copied!<p>I'm trying to present the facebook share dialog from my iOS app.</p> <p>This code opens the facebook app and shows the dialog:</p> <pre><code>FBShareDialogParams* params = [[FBShareDialogParams alloc] init]; params.link = urlToShare; params.name = @"Test"; params.description = @"Description"; params.picture = [NSURL URLWithString:FB_IMG_URL]; BOOL canPresentShareDialog = [FBDialogs canPresentShareDialogWithParams:params]; if (canPresentShareDialog) { [FBDialogs presentShareDialogWithParams:params clientState:nil handler:^(FBAppCall *call, NSDictionary *results, NSError *error) { if (error) { if ([FBErrorUtility shouldNotifyUserForError:error]) { UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Facebook-Error!" message:[FBErrorUtility userMessageForError:error] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } } else { NSLog(@"SUCCESS"); } }]; } </code></pre> <p>In the completion handler I want to know if the user canceled the action. The results dictionary should tell me that. However I only get <code>didComplete=YES</code> in the dictionary but not a <code>completionGesture</code>. The <code>NSError</code> object is always <code>nil</code>.</p> <p>The results dictionary is explained here: <a href="https://developers.facebook.com/ios/share-dialog/" rel="nofollow">https://developers.facebook.com/ios/share-dialog/</a></p> <p>So the problem is I can't tell if the post was successful or not.</p> <p>Is something wrong with my code?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload