I am working on app in iOS. I have integrated Facebook App Invite, Everything works fine on Xcode 7.3.1, After updating my app to Xcode 8.1 , Facebook App Invite is not working and getting this error:
app invite error:Error Domain=com.facebook.sdk.core Code=9 "(null)"
I have used this code to implement Facebook App Invite if user is already login with facebook
- (void)fb_fetch_after_login{
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"MYAPPLINKURL"];
// present the dialog. Assumes self implements protocol
FBSDKAppInviteDialogDelegate
[FBSDKAppInviteDialog showFromViewController:self withContent:content delegate:self]; }
After this code execution , it gives error and call this delegate method
(void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didFailWithError:(NSError *)error{ [hud hide:YES]; NSLog(@"app invite error:%@", error); NSString *message = error.userInfo[FBSDKErrorLocalizedDescriptionKey] ?: @"There was a problem sending the invite, please try again later."; NSString *title = error.userInfo[FBSDKErrorLocalizedTitleKey] ?: @"Oops!";
[[[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; }
I have tried some solutions but did not work for me.Anyone have this issue before on Xcode 8.1. Any suggestion or help is appreciated. Thanks in advance...