使用iOS SimpleAuth

时间:2016-07-27 16:06:38

标签: ios facebook authorization

我正在尝试配置应用程序以使用社交帐户登录(Twitter,Facebook和G +)我首先使用此GitHub的SimpleAuth与Facebook,我创建了一个帐户并注册我的捆绑标识符,然后我从facebook获得了app_id并将其提供给配置

SimpleAuth.configuration[@"facebook"] = @{@"app_id":@"1075396712543857"};

然后我点击菜单项后调用了auth功能:

[SimpleAuth authorize:@"facebook" completion:^(id responseObject, NSError *error) {
    NSLog(@"\nResponse: %@\nError:%@", responseObject, error);

但我从API

收到此错误
2016-07-27 18:56:58.982 Deals[6922:2710218] 
Response: (null)
Error:Error Domain=SimpleAuthErrorDomain Code=102 "(null)" UserInfo=
{NSUnderlyingError=0x156852770 {Error Domain=com.apple.accounts Code=7 "The 
Facebook server could not fulfill this access request: Error validating access 
token: Session does not match current stored session. This may be because the 
user changed the password since the time the session was created or Facebook 
has changed the session for security reasons. (452)" UserInfo=
{NSLocalizedDescription=The Facebook server could not fulfill this access 
request: Error validating access token: Session does not match current stored 
session. This may be because the user changed the password since the time the 
session was created or Facebook has changed the session for security reasons. 
(452)}}}

任何人都可以请我指出我做错了什么,或者是否有其他工具可以用来实现社交登录

由于

1 个答案:

答案 0 :(得分:-1)

@ Mhand7您需要先登录facebook。转到设置 - >点击Facebook->并提供您的登录ID和密码。你的问题将得到解决。