我使用解析服务器通过 Facebook 实现了登录。
如果我使用它,我会正确获取用户信息:
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login
logInWithReadPermissions: @[@"public_profile",@"email"]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"Logged in %@",result);
[self fetchUserInfo];
}
}];
但我想使用 PFFacebookUtils 在 Parse 中轻松创建用户:
[PFFacebookUtils logInInBackgroundWithReadPermissions:@[@"public_profile",@"email"] block:^(PFUser *user, NSError *error) {
if (!user) {
//...
} else if (user.isNew) {
//...
} else {
//...
}
}];
Facebook 模式与授权请求一起出现,但是当我按确定时,我收到此错误:
[错误]:此用户的 Facebook 身份验证无效。(代码:101,版本:1.13.0)。
在 Facebook 上的应用程序设置里面,应用程序就在那里。