通过 API 对照片或相册的点赞数
是否可以使用 facebook 的 API 获取照片或相册的点赞数?
这是一个专辑的开放图的链接
http://graph.facebook.com/99394368305
但是它没有喜欢的数量。
在facebook上,你可以看到它有超过2475个赞
http://www.facebook.com/media/set/?set=a.99394368305.88399.40796308305
谢谢
Is it possible to get the number of likes for a photo or album using facebook's API?
This is a link to the open graph for an album
http://graph.facebook.com/99394368305
but it doesn't have the number of likes.
on facebook, you can see it has 2475+ likes
http://www.facebook.com/media/set/?set=a.99394368305.88399.40796308305
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用类似这样的 URL 来获取您需要的内容:
这是 一篇帖子详细解释了如何操作。
Try to use something like this as the URL to fetch what you need:
Here is a post that explains how in detail.
要获得照片的点赞很容易,正如您在 API 中看到的那样参考:
http://developers.facebook.com/tools/explorer/?method =GET&path=20531316728
对于相册,您可以使用喜欢连接来获取喜欢该相册的所有成员。因此,在您的情况下:
请注意,这不会返回计数。您必须手动查看结果并计算点赞数。所以你绝对应该缓存结果!
To get the likes for a photo is easy, as you can see in the API Reference:
http://developers.facebook.com/tools/explorer/?method=GET&path=20531316728
For an album you can use the likes connection to get all members who liked that album. So, in your case:
Notice that that won't return the count. You have to manually go through the results and count the likes. So you should definitely cache the results!