Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c “社会框架回报”;(#803)无法通过用户名(username)查询用户”;尝试获取用户提要时_Objective C_Facebook_Facebook Graph Api_Social Framework - Fatal编程技术网

Objective c “社会框架回报”;(#803)无法通过用户名(username)查询用户”;尝试获取用户提要时

Objective c “社会框架回报”;(#803)无法通过用户名(username)查询用户”;尝试获取用户提要时,objective-c,facebook,facebook-graph-api,social-framework,Objective C,Facebook,Facebook Graph Api,Social Framework,我使用iOs社交框架从某个用户那里检索facebook提要。 为此,在验证后,我将执行以下操作: NSURL *requestURL = [NSURL URLWithString:@"https://graph.facebook.com/username"]; SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET

我使用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) { ... }];
code = 2500;
        message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
        type = OAuthException;
响应返回:

error =     {
        code = 803;
        message = "(#803) Cannot query users by their username (username)";
        type = OAuthException;
    };
如果我使用
/me
而不是用户名,同样可以,但我想检索其他人的公共提要

我还尝试使用同样适用于我的用户的用户id,但我发现它不适用于其他用户,请求返回以下内容:

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) { ... }];
code = 2500;
        message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
        type = OAuthException;
我还尝试将访问令牌作为参数传递,但行为是相同的


有什么想法吗?

已经在评论中指出了,但是你不应该再使用用户名,也不能访问未授权你的应用程序的用户的数据

更改日志:


(只是想让回答率更高)

如果你在2014年4月30日之后创建了应用程序,你将只能为正在使用你的应用程序的用户获取数据。嘿,谢谢@WizKid,你从哪里获得这些信息的?我同意你的看法,但这个FindMyBid是什么。comit是一个很可能从个人资料页面中获取id的平台,这是不允许的。