【问题标题】:Facebook App Invite error after upgrading from XCode 7.3.1 to XCode 8.1从 XCode 7.3.1 升级到 XCode 8.1 后 Facebook App Invite 错误
【发布时间】: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


    【解决方案1】:

    我今天遇到了同样的问题,显然这是一个已知错误。看看他们在https://developers.facebook.com/bugs/984731934986423/ 中修复它时的解决方法

    【讨论】:

    • 感谢您的回答我还发现这是 facebook 错误,今天它在不更改任何代码的情况下解决了...谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-28
    • 1970-01-01
    • 2012-01-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多