Question

I have to integrate app request on my app but it doesn't seem to work. I searched about it and I can't find a clear answer. Some replies from the reports said that the request can be found in Facebook App Center but I didn't receive any request and also, no notification was received.

I'm using Facebook SDK for iOS v3.8 to send the request. There's no error and there's a request, it was always successful but still no notification.

Here is the code I'm using to send the request.

- (void)sendAppInvite:(NSString *)message {
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"app_non_users", @"filters", nil];

    [FBWebDialogs presentRequestsDialogModallyWithSession:[FBSession activeSession] message:message title:nil parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
        if (error) {
            // Case A: Error launching the dialog
            NSLog(@"Error on app invite.");
        } else {
            if (result == FBWebDialogResultDialogNotCompleted) {
                // Case B: User clicked the "x" icon
                NSLog(@"User canceled app invite");
            } else {
                // Case C: Dialog shown and the user clicks Cancel or Share
                NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
                if (![urlParams valueForKey:@"request"]) {
                    // User clicked the Cancel button
                    NSLog(@"User canceled app invite");
                } else {
                    // User clicked the Send button
                    NSString *postID = [urlParams valueForKey:@"request"];
                    NSLog(@"Request successful: %@", postID);
                }
            }
        }
    }];
}

I also tried to build the sample app from Facebook, I sent an invite. Still, no notification and no request from the app center.

Is there something that I'm doing wrong? Also, is there a bug from Facebook Request?

Thanks!

Was it helpful?

Solution 2

Only apps that are actually on facebook.com can use the Notifications API. Note this is different than "app requests". In other words, you can't get your app to post a notification in the top right corner where the globe is.

OTHER TIPS

You have to Add app in your developer account

facebook -> Apps -> "You app" -> Setting -> add platform -> App on Facebook -> Add any URl

Now you will get app request notification

you Set enable in sandbox mode in facebook developer

Visit

In your Facebook go to games->apps->app request and see app notification

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top