3

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!

dzep
  • 685
  • 1
  • 8
  • 20
  • Did you figure this out? I am having the same problem. – Harish Nov 19 '13 at 11:29
  • I really didn't know what happened. I tested it again last week, and my friend seen the request although not in the notifications but in the app center. – dzep Dec 02 '13 at 02:33
  • yes, that is right. I realized my notifications being sent to App Center – Harish Dec 02 '13 at 03:06

3 Answers3

2

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

Ashish Patel
  • 332
  • 2
  • 7
1

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.

Famer Joe
  • 161
  • 1
  • 4
0

you Set enable in sandbox mode in facebook developer

Visit

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

itzmebibin
  • 9,199
  • 8
  • 48
  • 62
Arjun Sa
  • 125
  • 2
  • 13