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?
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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With