【问题标题】:requestAccessToAccountsWithType return error code 7requestAccessToAccountsWithType 返回错误代码 7
【发布时间】:2015-06-10 03:43:50
【问题描述】:

我正在使用 [ACAccountStore requestAccessToAccountsWithType] 获取登录 iOs Facebook 设置的用户的 Facebook 用户信息。直到上周它仍然可以正常工作,现在它总是返回错误代码 7。

Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: remote_app_id does not match stored id  (404)" UserInfo=0x7fef59d8a760 {NSLocalizedDescription=The Facebook server could not fulfill this access request: remote_app_id does not match stored id  (404)}

我不知道为什么会发生这种情况,而且我们没有更改 developer.facebook.com 中的设置。

这是我的代码行。

NSDictionary *options = @{
                          ACFacebookAppIdKey : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FacebookAppID"],
                          ACFacebookPermissionsKey : @[@"email"],
                          ACFacebookAudienceKey: ACFacebookAudienceFriends
                          };
ACAccountType *FBaccountType= [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[self.accountStore requestAccessToAccountsWithType:FBaccountType options:options completion:
 ^(BOOL granted, NSError *error) {
     if (granted) {
     } else {
           // it always return not granted.
         }
     }
 }];

我不知道为什么现在会这样。

我已经从这个iOS 6 Facebook posting procedure ends up with "remote_app_id does not match stored id" 和这个Getting error ACErrorPermissionDenied (error code 7) for Facebook when using Social Framework 中检查了一些东西,但没有找到任何运气。

【问题讨论】:

    标签: ios facebook acaccountstore


    【解决方案1】:

    问题是以下之一:

    1. 在您的 xcode 项目中输入的 app_id 与您在 developers.facebook.com 中的 app_id 不匹配。确保您已按照 Facebook 文档中的说明正确设置 plist 文件。 https://developers.facebook.com/docs/ios/getting-started/#configure

      • 使用字符串值创建一个名为 FacebookAppID 的键,并在其中添加应用 ID。
      • 使用字符串值创建一个名为 FacebookDisplayName 的键,并添加您在应用仪表板中配置的显示名称。
      • 使用称为 URL 方案的单个数组子项创建一个称为 URL 类型的数组键。使用您的应用 ID 以 fb 为前缀的单个项目。
    2. 如果您的 app_id 正确匹配,请确保在 developers.facebook.com 的设置中输入应用商店 ID。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-17
      • 2013-05-01
      • 2011-12-04
      • 2014-07-03
      • 1970-01-01
      • 1970-01-01
      • 2017-06-03
      相关资源
      最近更新 更多