Search code examples
iosobjective-cfacebookfacebook-graph-apifacebook-invite-friends

Invite Facebook friends to use app


I am trying to use Facebook API to enable invite friends to use my App I used the Facebook Developers documentations . The problem is that when the user invite his friends the notifications appears on those who use android native Facebook App but doesn't appear for the users that uses the iOS side.

Here is my code

 FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
        content.appLinkURL = [NSURL URLWithString:@"https://fb.me/<myAppLinkURL>"];
        //optionally set previewImageURL
        content.previewImageURL = [NSURL URLWithString:@"https://img.youtube.com/vi/fuBhQX3ki1Q/mqdefault.jpg"];

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

Solution

  • You have to add iOS iPhone Store Id in app's setting please have a look into attached screenshot. And also fill all to required information for ios when you are generating AppUrlLink

    enter image description here