Huralnyk
Huralnyk

Reputation: 747

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?

Upvotes: 7

Views: 4544

Answers (3)

Alonso Villanueva
Alonso Villanueva

Reputation: 1

My app invites didn't trigger a notification because the app was not public. Ajay_nasa suggested publishing the app. I handled it by adding testers and developers to the app in the roles section of the app dashboard (i.e. https://developers.facebook.com/apps//roles/). After that, those user received the invites successfully.

Upvotes: -1

ajay_nasa
ajay_nasa

Reputation: 2298

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

Upvotes: 2

Roemer
Roemer

Reputation: 3576

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?

Upvotes: 3

Related Questions