简体   繁体   English

Facebook API-检查帖子的赞和评论

[英]Facebook API - Check Likes and Comments of Post

Is there a way to check the number of likes and comments that a particular post has? 有没有一种方法可以检查特定帖子的喜欢和评论数量? I wanna display that number on my site so i need to reference the API somehow to get that result. 我想在我的网站上显示该数字,所以我需要以某种方式引用该API以获得该结果。 I am looking for either a PHP or a javascript solution. 我正在寻找PHP或javascript解决方案。 This will also be done dynamically. 这也将动态完成。 I want to keep track of likes posted by my app to different users so I'm thinking i should store the post id when I make the post. 我想跟踪我的应用发布给不同用户的喜欢,因此我认为我在发布信息时应该存储帖子ID。 Any ideas? 有任何想法吗?

Each post in facebook has a specific Id Facebook中的每个帖子都有一个特定的ID

You can use graph api to grab this id and see all the comments, likes and shares of it. 您可以使用图表API来获取此ID,并查看其所有评论,喜欢和分享。

You simply have to make a POST call and grab the produced JSON 您只需要进行POST调用并获取生成的JSON

More information can be found on the links below http://graph.facebook.com/19292868552_10150189643478553 可以在以下链接上找到更多信息: http://graph.facebook.com/19292868552_10150189643478553

https://developers.facebook.com/tools/explorer/?method=GET&path=19292868552_10150189643478553 https://developers.facebook.com/tools/explorer/?method=GET&path=19292868552_10150189643478553

https://developers.facebook.com/docs/reference/api/post/ https://developers.facebook.com/docs/reference/api/post/

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

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