facebook invite example can run simulator but not run iPhone device

93 Views Asked by At

facebook app invite:

FBSDKAppInviteContent *content = [[FBSDKAppInviteContent alloc] init];
NSString *appLink = [@"https://fb" stringByAppendingString:@".me/176327329406660"];
content.appLinkURL = [NSURL URLWithString:appLink];
[FBSDKAppInviteDialog showFromViewController:self withContent:content delegate:self];

simulator run well, but iPhone device is not.

the errose app invite error:

Domain=com.facebook.sdk.core Code=9 "(null)"

1

There are 1 best solutions below

1
On

This problem occurs in devices, it will not occur in simulator, try below steps may that solve your problem:

sign out from Facebook from iPhone Settings/Facebook on your phone.

  • Go to seeting of your phone

  • Open facebook setting

  • Allow facebook interaction in facebook settings.