Take the 2-minute tour ×

I'm trying to implement the native facebook share for iOS 6 and need check if a share did succeed or not. This is the code I have used:

BOOL displayedNativeDialog =
     handler:^(FBNativeDialogResult result, NSError *error) {
         if (error) {
             /* handle failure */
             NSLog(@"error:%@, %@", error, [error localizedDescription]);
         } else {
             if (result == FBNativeDialogResultSucceeded) {
                 /* handle success */
                 NSLog(@"handle success");
             } else {
                 /* handle user cancel */
                 NSLog(@"user cancel");
    if (!displayedNativeDialog) {
        /* handle fallback to native dialog  */

My problem is when I try this with no internet connection available I still get the FBNativeDialogResultSucceeded

It looks like you should get an error when no internet connection is available but it seems that it doesn't work like that. If there are some solution where I don't need to use the reachability SDK that would be great.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You'll likely have to use the reachability SDK at this point. The Facebook SDK builds on top of the SLComposeViewController for the native functionality. That view controller returns two possible choices:

  • SLComposeViewControllerResultCancelled
  • SLComposeViewControllerResultDone

SLComposeViewControllerResultDone: The view controller is dismissed and the message is being sent in the background. This occurs when the user selects Done.

So since Facebook mirrors this the success case means the user clicked done and the message has been sent in the background.

However if you run this and there is no internet connection, the user should still see a pop-up indicating that the post could not be sent due to a connection failure.

share|improve this answer

Your Answer


