如何使用 Facebook Graph API 获取我的网站的推荐?
我想在我的网站上添加一个“喜欢/推荐”按钮。然后,我希望能够使用 Graph API 查询我的域的推荐(例如 17 人喜欢 mysite.com/thisawesomepage)
有一个插件可以执行此操作: http://developers.facebook.com/docs/reference/plugins/recommendations, 但我希望能够检索原始数据。
这可能吗?
I want to add a like/recommendation button to my site. Then, I want to be able to use the Graph API to query the recommendations for my domain (e.g. 17 people liked mysite.com/thisawesomepage)
There is a plugin that does this: http://developers.facebook.com/docs/reference/plugins/recommendations,
but I want to be able to retrieve the raw data.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需要您网站的“like_id”。您可以通过喜欢它并通过图形 API 或其他方式查看您的喜欢列表来获得它。
然后你只需将其放入这样的网址中:
https://graph.facebook.com/125086767519561
125086767519561是 The Glamourist 的 id,您可以看到在撰写本文时它已被点赞 198 次。
you just need the 'like_id' of your site. you can get it by liking it and looking at your list of likes through the graph api or however else.
then you just put it in a url like this:
https://graph.facebook.com/125086767519561
125086767519561 is the id of the The Glamourist, and you can see that it has been liked 198 times at the time of this writing.