无法使用图形API访问朋友的信息 [英] Can't access friends's informations with the graph API

查看:102
本文介绍了无法使用图形API访问朋友的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用图形API来检索朋友的生日。

I'd like to retrieve, for instance, a friend's birthday, using the graph API.

所以我选择一个朋友的生日,我的个人资料可以看到,去到Graph API资源管理器,生成一个访问令牌,使用 friends_birthday 权限,并输入 [friend_name] /?fields = birthday 和...它不返回任何东西。侧面的生日字段显示为灰色,并显示一条鼠标悬停文字,说明

So I pick a friend whose birthday my profile can see, go to the Graph API Explorer, generate an access token with the friends_birthday privilege, and input [friend_name]/?fields=birthday and... it doesn't return anything. The birthday field on the side is grayed out, with a mouse-over text that says


最糟糕的部分是它对一些朋友来说很好,但不适合别人这与他们的个人资料中的这些信息的可见性水平有关吗?我认为应用程序可以看到我的个人资料可以看到的一切(如果我给它完全的权限),但也许不是这样。或者我的要求有问题吗?

The worst part is that it works fine for some friends, but not for others. Is it related to the level of visibility they set for this information on their profile? I assumed that the app can see everything my profile can see (if I give it full privileges), but maybe that's not the case. Or is there something wrong with my request?

推荐答案

我有同样的问题,答案是你的朋友可以改变它给应用程序的权限。因此,对于Graph API Explorer应用程序,您的朋友需要为应用程序授予user_birthday权限,以便您可以通过该应用程序查看他们的生日(并且您还必须将该应用程序的friend_birthday权限授予)。

I had the same problem and the answer is that your friend can change the permissions it gives to apps. So, for the Graph API Explorer app your friend would need to give the user_birthday permission to the app in order for you to see their birthday through the app (and you have to give the app the friends_birthday permission as well).

请参阅这里的评论,帮助我弄清楚。

See here for the comment that helped me figure that out.

这篇关于无法使用图形API访问朋友的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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