1

iOS SDK: Is it a known issue that when a user cancels a Feed Dialog (or any other platform dialog) the dialogCompleteWithUrl: and dialogDidComplete: FBDelegate methods get called – which obviously is wrong.

dialogDidNotComplete: gets called correctly when the user cancels with the little close icon (circle with the x inside).

Is this a bug? Or is there any other way of finding out the difference between canceling the dialog via Cancel and Sharing?

Ralf
  • 2,512
  • 4
  • 24
  • 26
  • does this question not help: http://stackoverflow.com/questions/4411923/facebook-connect-for-ios-dialogdidcomplete-response-differentiation – Andrew Jun 07 '12 at 23:43
  • Why has no one up-voted this question besides me, I wonder? This SO question is linked on the relevant page in Facebook SDK docs: http://developers.facebook.com/docs/reference/iossdk/FBDialogDelegate/ – Tom Pace Dec 06 '12 at 22:09

1 Answers1

0

Might as well post the solution to close this question.

This question is different than the one listed in Facebook Connect for iOS: dialogDidComplete response differentiation

but the solution is the same:

#pragma mark - FBDialogDelegate 

- (void) dialogCompleteWithUrl:(NSURL*) url
{
    if ([url.absoluteString rangeOfString:@"post_id="].location != NSNotFound) {
        // user pressed "Send"
    } else {
        // user pressed "Cancel" button (although not the circle with X)
    }
}
Community
  • 1
  • 1
Tom Pace
  • 2,347
  • 1
  • 24
  • 32