社交框架返回“(#803)无法通过用户名(用户名)”查询用户尝试获取用户Feed时 [英] Social framework returns "(#803) Cannot query users by their username (username)" when trying to get user feed

查看:94
本文介绍了社交框架返回“(#803)无法通过用户名(用户名)”查询用户尝试获取用户Feed时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iO社交框架,以便从某个用户检索Facebook订阅源。
为了这个目的,在进行身份验证后,我正在执行以下操作:

I'm using iOs social framework in order to retrieve facebook feeds from a certain user. For that purpose, after authenticating I'm doing the following:

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 而不是用户名,但我想要检索其他公共Feed。

The same works if I use /me instead of the username, but I want to retrieve someone else public feed.

我还尝试使用用户的id,这也适用于我的用户,但我不适用于其他用户,请求返回以下内容:

I also tried using the user's id which also works for my user, but I it doesnt work for other users, the request returns the following:

code = 2500;
        message = "The global ID 100008339709776 is not allowed. Please use the application specific ID instead.";
        type = OAuthException;

我还尝试传递访问令牌作为参数,但行为是一样的。

I also tried passing the access token as parameter but the behavior is the same.

任何想法?

推荐答案

已经在评论中指出,但你不应该使用用户名,您无法访问未授权您的应用程序的用户的数据。

Already pointed out in the comments, but you are not supposed to use the username anymore and you can´t access data of users who did not authorize your App.

更改日志: https://developers.facebook.com/docs/apps/changelog

(只是想得到答案率较高)

(just trying to get the answer rate on SO higher)

这篇关于社交框架返回“(#803)无法通过用户名(用户名)”查询用户尝试获取用户Feed时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆