3

I am building a app, in which i implemented Facebook invite feature. I have write this code to implement invite feature

FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
    content.appLinkURL = [NSURL URLWithString:@"https://fb.me/xxxxxxxxxx"];
    content.appInvitePreviewImageURL = [NSURL URLWithString:@"https://www.example.com/my_invite_image.jpg"];
    [FBSDKAppInviteDialog showWithContent:content delegate:self];

and added FacebookAppID and URL types key in info.plist file.

Now when i run app and execute this code, app redirect to facebook app, and then return back to my app automatically with this error.

The operation couldn’t be completed. (com.facebook.sdk.core error 3.)

When i change FacebookAppID value to another facebook appId, it works and displayed invite page on facebook app, but didn't works for my Original facebook app. I have checked all setting on facebook for both app, both are similar.

Do anyone know what am doing wrong ?

Thanks !

Surjeet Singh
  • 11,691
  • 2
  • 37
  • 54

1 Answers1

3

The code looks fine so this is very likely a configuration issue. I would check that you have correctly configured the iOS bundle URL and have also set a valid iPhone Store ID (for testing pruposes, it doesn't have to be your app's store id, you can take the id from any app that already exists)

For more details, check Facebook's official documentation

curveorzos
  • 529
  • 6
  • 16