Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook App Invite Dialog is not working

I am trying to integrate Facebook App Invite Dialog in my iOS app. For test purposes I created this test application and generated App Link for it.

Running next code:


FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"https://fb.me/1453356328318807"];
//optionally set previewImageURL
content.appInvitePreviewImageURL = [NSURL URLWithString:@"http://someimage-1200x628.jpg"];

// present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
[FBSDKAppInviteDialog showWithContent:content
                             delegate:self];

shows app invite dialog with ability to chose friends and send them invites to my app. Everything goes fine, I got invocation of delegate method:

(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results

with result:

{
    didComplete = 1;
}

But receiver didn't get notification. Receiver user is also registered user for my app Tester User with native Facebook App installed.

Maybe somebody got same problem and knows how to fix it?

like image 970
Huralnyk Avatar asked Jul 01 '15 15:07

Huralnyk


2 Answers

Did the test user already installed the app? If so, it's expected that they don't receive App Invite notifications.

You can read more in the documentation on App Invites:

If the person already has the app installed, they will not receive a push notification.

Can you check if this might be the situation?

like image 74
Roemer Avatar answered Sep 21 '22 08:09

Roemer


Your code is fine and this feature will actual work when you publish your app because some Facebook integration require approval before usage. Submit your app for approval in Status And Review section

like image 35
ajay_nasa Avatar answered Sep 22 '22 08:09

ajay_nasa