0
votes

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...

1

1 Answers

0
votes

I had the same issue today, and apparently it's a known bug. Take a look at their workaround while they fix it in https://developers.facebook.com/bugs/984731934986423/