Search code examples
facebookfacebook-ios-sdk

Does not receive any "Request" after sending out from iOS Facebook SDK


I'm following these two tutorials in Facebook developer website https://developers.facebook.com/docs/tutorials/ios-sdk-games/requests/

https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/#step2

These are my codes:

[FBWebDialogs presentRequestsDialogModallyWithSession:nil
     message:[NSString stringWithFormat:@"I just smashed %u friends! Can you beat it?", score]
     title: nil
     parameters:params
     handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
    {
         if (error)
         {
             // Case A: Error launching the dialog or sending request.
             UIAlertView* alert = [[UIAlertView alloc] initWithTitle: @"Facebook" message: error.description delegate: nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
             [alert show];
             [alert release];
         }
         else
         {
             if (result == (FBWebDialogResultDialogCompleted))
             {
                 // Handle the publish feed callback
                 NSDictionary *urlParams = [self parseURLParams:[resultURL query]];

                 if ([urlParams valueForKey: @"request"])
                 {
                     // User clicked the Share button
                     NSLog(@"Send");
                 }
             }
         }
    }];

Problem is after I send out the request, my friend told me that he doesn't receive any notification/request in FB Notification Center site. Does anyone know why?

These are the things I've done:

  1. I've setup properly in info.plist and the Facebook App.

  2. I'm not using Sandbox mode.

  3. My current application is able to log in and post to wall.

  4. I've publish_actions permission.

  5. I did not received any error or warning.


Solution

  • I found my solution here: Facebook App Requests aren't shown on iOS devices?

    It is because I didn't set the iPhone App ID and iPad App ID