Friends_interests/likes/etc 从 Facebook Graph API 返回为空白
我一直在摆弄图形 API,并且能够很好地访问我自己的信息。但是,当我尝试类似的操作时:
https://graph.facebook.com/999999/likes ?access_token=xxx (其中 999999 是朋友的 ID)
我得到一个空白图表,如下所示:
{ “数据”: [
] 请记住,
我暂时都是手动完成这一切。这是我用来向我的个人资料请求权限的 URL:
一切都很顺利,我得到了我的访问代码,但我仍然收到空白图表。建议?
谢谢。
I've been messing around with the graph API and have been able to access my own information just fine. However, when I attempt something like:
https://graph.facebook.com/999999/likes?access_token=xxx (where 999999 is a friend's ID)
I get a blank graph like so:
{
"data": [
]
}
Keep in mind I'm doing this all manually for the time being. This is the URL I used to request permission from my profile:
It all works hunky-dory and I get my access code, yet I still receive the blank graph. Suggestions?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你有尝试过多个朋友吗?您的朋友可以配置第三方应用程序可以访问他们的哪些信息。例如,如果我们是朋友,我可以限制您使用的应用程序看不到有关我的任何信息。
您也可以查看帐户 -->隐私-->设置-->应用程序并查看您的应用程序实际上是否具有您认为您作为用户授予它的权限。
-凯文
Have you tried multiple friends? Your friends can configure what information third party applications can have access to, of theirs. For example I could limit applications that you use to not see anything about me, if we were friends.
Also you could check in account --> privacy --> settings --> applications and see if your application in fact has the permissions you think you granted it as a user.
-Kevin
我同意凯文的观点。您需要先请求权限才能获取信息,并且您还需要做好准备您将得到一个空白列表。
我建议您使用已经构建的 api,因为它会节省您很多时间。我最近在此处发布了一个,应该可以让您立即上手。
代码如下所示:
此外,您还可以通过调用以下命令来获取朋友列表
I agree with kevin. You need to request permissions first to get at the info and you also need to be prepared that you will get a blank list.
I suggest that you use an already built api as it will save you a lot of time. I've recently released one here that should get you going in no time at all.
The code looks like this:
Also you can get a list of friends by calling this
我注意到,即使应用程序可以请求(并被授予)某些权限,例如访问“喜欢”,但这并不一定意味着应用程序能够访问此信息。
我对此不是 100% 确定,但可能有两种情况,例如请求用户喜欢会导致空数据集,即使用户请求并授予了正确的权限:
用户已设置自定义权限在他/她的隐私设置中
不公开信息(例如“喜欢”)。基本上都是定制的
权限设置推翻了授予的权限
已请求应用程序。
用户未满 18 岁。 https://www.facebook.com/help/?page=214189648617074" rel="nofollow">https://www.facebook.com/help/? page=214189648617074
I have come to notice that even though an application can request (and be granted) certain permissions, e.g. to access Likes, it doesn't necessarily mean that an application will be able to access this information.
I'm not a 100% certain of this but there might be two instances where e.g. requesting a users Likes results in an empty data set even though the right permissions where requested and granted by the user:
The user has set custom permissions in his/her privacy settings
not make public the information (e.g. Likes). Basically, customized
permission settings overrule the granted permissions that an
application requested.
The user is under 18. https://www.facebook.com/help/?page=214189648617074