因此,我尝试使用 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
request一起使用时它确实有效5120148605?fields=id,name,about,bio
。
有人知道这种奇怪的行为吗?