简体   繁体   English

访问令牌 Facebook 图 api?

[英]Access token Facebook graph api?

After created an app on FB, I get an access token XXX在 FB 上创建应用程序后,我获得了访问令牌 XXX

when I open https://graph.facebook.com/me/likes?access_token=XXX it does show all information that I likes fine.当我打开https://graph.facebook.com/me/likes?access_token=XXX时,它确实显示了我喜欢的所有信息。

but when I open to see from another user (who set those info public,such as https://graph.facebook.com/4/likes?access_token=XXX ) I got nothing but但是当我打开看到另一个用户(将这些信息设置为公开,例如https://graph.facebook.com/4/likes?access_token=XXX )时,我什么也没有得到

    {
   "data": [

   ]
}

Can somebody expand to me why and any idea solve?有人可以向我扩展为什么和任何想法解决吗?

You can not view the likes of a public profile, you have to ask for permission(user_likes) from the app to see this info.您无法查看公开个人资料的点赞,您必须向应用程序请求许可(user_likes)才能查看此信息。


Info on the user_likes permissions有关user_likes权限的信息

user_likes: Provides access to the list of all of the pages the user has liked as the likes connection user_likes:提供对用户喜欢的所有页面列表的访问权限作为喜欢连接


Example of Public profile( sorry btaylor, but your name is on the docs )公开个人资料示例(对不起 btaylor,但你的名字在文档上

https://graph.facebook.com/btaylor/likes?access_token=xxx https://graph.facebook.com/btaylor/likes?access_token=xxx

You will see an empty data set.您将看到一个空数据集。


From the user docs, talking about the likes connection:从用户文档中,谈论 喜欢的连接:

Read

You can read the pages that a User has liked by issuing an HTTP GET to /PROFILE_ID/likes with the user_likes or friends_likes permissions.您可以通过使用 user_likes 或 friends_likes 权限向 /PROFILE_ID/likes 发出 HTTP GET 来阅读用户喜欢的页面。 For example:例如:

https://graph.facebook.com/me/likes https://graph.facebook.com/me/likes

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM