【问题标题】:Facebook iOS SDK(Graph API) can't access public page informationFacebook iOS SDK(Graph API) 无法访问公共页面信息
【发布时间】:2013-09-09 20:05:49
【问题描述】:

所以我正在尝试使用 iOS SDK 通过 Facebook 图形 API 获取页面名称:

NSDictionary* params = [NSDictionary dictionaryWithObject:@"id,name" forKey:@"fields"];

[[FBRequest requestWithGraphPath:[NSString stringWithFormat:@"%@", userId] parameters:params HTTPMethod:nil] startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
     name = [result objectForKey:@"name"];
     //do more stuff
}];

我收到了错误

error = {
   code = 803;
   message = "(#803) Some of the aliases you requested do not exist: (null)";
   type = OAuthException;
};

我的 accesstoken 是有效的,当我将 Graph API Explorer 与 GET 请求 5120148605?fields=id,name,about,bio 一起使用时,它确实有效。

有人知道这种奇怪的行为吗?

【问题讨论】:

  • 你收到id了吗?你得到的result 是什么?
  • 结果为零。我只是收到错误消息,但对我的朋友来说它有效,只是不适用于页面。很奇怪。
  • 您提出什么要求? /page_id?如果是,您提供的 page_id 是什么?
  • 我正在使用我的时间线的页面 ID。例如5120148605
  • 我现在通过userId = [NSString stringWithFormat:@"%@", userId] 解决了这个问题。似乎我需要这个页面而不是用户。很奇怪。

标签: ios facebook facebook-graph-api facebook-ios-sdk facebook-access-token


【解决方案1】:

我现在通过userId = [NSString stringWithFormat:@"%@", userId] 解决了这个问题。似乎我需要这个页面而不是用户。

我不知道为什么会出现这种情况,或者其他人是否遇到过这个问题,但这是我解决它的方法。

【讨论】:

    猜你喜欢
    • 2015-02-18
    • 2021-03-27
    • 1970-01-01
    • 2017-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-19
    • 1970-01-01
    相关资源
    最近更新 更多