1

我使用解析服务器通过 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 上的应用程序设置里面,应用程序就在那里。

4

1 回答 1

0

当用户更改 Facebook 密码或在 Facebook 上的应用程序设置中删除您的应用程序时,它会在 Parse 应用程序中发生。

User.authData 应该用 更新PFFacebookUtils.logInInBackgroundWithReadPermissions:,但它似乎没有更新。我认为这是 Parse Server 的问题。

解决方法:发生该错误时,您可以将 User.authData 更新为PFFacebookUtils.linkUserInBackground:withReadPermissions:.

于 2016-07-11T00:45:19.130 回答