'Facebook App Invite error after upgrading from XCode 7.3.1 to XCode 8.1
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?
Solution 1:[1]
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/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jeremie |