Facebook iOS SDK(图谱API)无法访问公共页面信息

时间:2013-09-09 20:05:50

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

所以我试图使用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;
};

我的访问权限是有效的,当我使用带有GET请求5120148605?fields=id,name,about,bio的{​​{1}}请求的图谱API资源管理器时,它确实有效。

任何人都知道这种奇怪的行为吗?

1 个答案:

答案 0 :(得分:2)

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

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