Ome*_*mer 7 facebook objective-c facebook-graph-api social-framework
我正在使用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) { ... }];
Run Code Online (Sandbox Code Playgroud)
响应返回:
error = {
code = 803;
message = "(#803) Cannot query users by their username (username)";
type = OAuthException;
};
Run Code Online (Sandbox Code Playgroud)
如果我使用/me而不是用户名,同样的工作,但我想检索其他公共提要.
我也尝试使用用户的id,这也适用于我的用户,但我不能为其他用户工作,请求返回以下内容:
code = 2500;
message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
type = OAuthException;
Run Code Online (Sandbox Code Playgroud)
我也尝试将访问令牌作为参数传递,但行为是相同的.
有任何想法吗?
已在评论中指出,但您不应再使用用户名,并且您无法访问未授权您的应用的用户数据.
更改日志:https://developers.facebook.com/docs/apps/changelog
(只是试图让答案率更高)
| 归档时间: |
|
| 查看次数: |
17686 次 |
| 最近记录: |