[英]Facebook Graph API check likes
How do I check if the authenticated user has liked a particular post? 如何检查通过身份验证的用户是否喜欢特定帖子?
I am not using the Facebook SDK. 我没有使用Facebook SDK。
Thanks! 谢谢!
You can use Facebook Graph API , there is fields likes , so it will get all likes data of the specific post. 您可以使用Facebook Graph API ,其中包含点赞 ,因此它将获取特定帖子的点赞数据。 Then, you can check whether your friend id in the likes data.
然后,您可以检查喜欢数据中的朋友ID。
With a post has lot of likes, you can use limit parameter like this. 有很多喜欢的帖子,可以这样使用limit参数。
/{post_id}?fields=likes.limit(5000)
The likes data supports paging, so you might fetch all likes of the post. 点赞数据支持分页,因此您可以获取帖子的所有点赞。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.