我正在使用 iOs 社交框架从某个用户那里检索 facebook 提要。 为此,在进行身份验证后,我将执行以下操作:
NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/username"];
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET
URL:requestURL parameters:nil];
request.account = self.facebookAccount;
[request performRequestWithHandler:^(NSData *data, NSHTTPURLResponse *response, NSError *error) { ... }];
响应返回:
error = {
code = 803;
message = "(#803) Cannot query users by their username (username)";
type = OAuthException;
};
如果我使用 /me
而不是用户名,同样有效,但我想检索其他人的公共(public)提要。
我还尝试使用用户 ID,它也适用于我的用户,但我对其他用户不起作用,请求返回以下内容:
code = 2500;
message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
type = OAuthException;
我也尝试过将访问 token 作为参数传递,但行为是一样的。
有什么想法吗?
最佳答案
已在评论中指出,但您不应再使用该用户名,并且您无法访问未授权您的应用程序的用户的数据。
变更日志:https://developers.facebook.com/docs/apps/changelog
(只是想获得更高的回答率)
关于objective-c - 社交框架在尝试获取用户提要时返回 "(#803) Cannot query users by their username (username)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23615961/