【发布时间】:2017-03-23 07:42:18
【问题描述】:
我正在开发 iOS 应用程序。我已集成 Facebook App Invite,在 XCode 7.3.1 上一切正常,将我的应用更新到 XCode 8.1 后,Facebook App Invite 无法正常工作并出现此错误:
应用邀请错误:
错误域=com.facebook.sdk.core Code=9 "(null)"
如果用户已经使用 facebook 登录,我已经使用此代码来实现 Facebook App Invite
- (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];
}
这段代码执行后,报错并调用该委托方法
- (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];
}
我尝试了一些解决方案,但对我不起作用。有人在 Xcode 8.1 上遇到过这个问题吗?
【问题讨论】:
标签: ios xcode facebook facebook-graph-api