我正在使用Xcode 7.2,在iOS 9.2上进行测试,并使用
pod "FBSDKCoreKit";
pod "FBSDKLoginKit";
pod "FBSDKShareKit";
pod "FBSDKMessengerShareKit"; 登录后,它的显示错误-canOpenURL: failed:"fbauth2:/“- error:"(null)”。在操作系统7和8中,它工作得很好。请帮个人。
if ([FBSDKAccessToken currentAccessToken]) {
// TODO:Token is already available.
[[FBSDKLoginManager new] logOut];
}else{
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
login.loginBehavior=FBSDKLoginBehaviorBrowser;
[login
logInWithReadPermissions: @[@"public_profile"]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"Logged in %@",result);
[self getFacebookProfileInfo];
}
}];
}登录后,只打开此页面,而不是关闭屏幕。

发布于 2016-04-12 09:48:16
在将此fbauth2添加到CFBundleURLSchemes下后,"fbauth2:/“- error:"(null)”将被删除。并使用此[FBSDKApplicationDelegate sharedInstance应用程序:app openURL:url sharedInstance“
login.loginBehavior=FBSDKLoginBehaviorBrowser;
Facebook在IOS 9.2中运行良好
https://stackoverflow.com/questions/36491766
复制相似问题