objective-c - 社交框架在尝试获取用户提要时返回 "(#803) Cannot query users by their username (username)"

标签 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
                                                  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/

相关文章:

php - 接受后无法删除 Facebook 中的申请邀请

ios - 无法将数据从 TableView 传递到 View Controller

java - 使用 Android 共享 Intent 在 Facebook 中共享文本

javascript - SQL 查询未从 AJAX '$_POST' 执行到 PHP 文件

android - Graph Api 未从 Android 中的 Facebook SDK 获取位置

ruby-on-rails - rails : How to set og:image meta tags?

ios - 使用适用于 iOS v2 的 Google Analytics SDK 跟踪屏幕层次结构

iphone - 我如何在 objective-c 中编写一个函数,我可以在我的 iPhone 应用程序中使用任何对象?

ios - 对 iPhone 6+ 旋转使用react——traitCollectionDidChange : called twice for nav controller

iphone - 使用 xcode 4 实现适用于 iPhone 的 Facebook Connect