Facebook API:朋友的hometown_location和current_location始终使用FQL清空

man*_*ara 4 facebook facebook-fql facebook-graph-api

我一直在以各种可能的角度看待这个问题而我无法理解它,也许你们可以提供帮助.我运行此查询以获取我朋友的家乡和位置:

SELECT uid, name, timezone, hometown_location, current_location 
FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = me() )
Run Code Online (Sandbox Code Playgroud)

并且hometown_location和current_location 始终为 NULL,即使它们不应该是NULL.使用像/ me/friends这样的东西?fields = hometown,location,...有相同的结果.

另外,查询我自己的hometown_location和current_location是否正常工作.这让我觉得我没有权限访问我朋友的家乡和位置......但是如果是这样的话,不应该提出错误吗?

不过,我的应用程序具有相同的权限:user_about_me,friends_about_me,user_hometown,friends_hometown,user_location和friends_location,所以我不认为这是问题所在.

如果我访问http://developers.facebook.com/docs/reference/api/并点击https://graph.facebook.com/me/friends?access_token= ...链接,我追加&fields =名字,故乡,它的工作原理,所以我知道它可以做到.

知道我能做错什么吗?

非常感谢!

曼努埃尔

C A*_*thy 6

对于friends_hometown,您需要friends_hometown权限.

对于current_location,您需要friends_location权限.

确保拥有这些权限后,您应该能够通过运行该查询或使用具有这些权限的access_token 的图谱API - https://graph.facebook.com/FRIEND_ID?fields=hometown,location来获取数据.