如何从 facebook 的 like 按钮获取点赞数? 有什么办法可以做到这一点吗?
最佳答案
获取facebook点赞数的方法有两种。
- 图形 API
http://graph.facebook.com/?ids=http%3a%2f%2ffacebook.com
结果是 JSON:(出于某种原因,“喜欢”被称为“分享”)
{
"http://facebook.com": {
"id": "http://facebook.com",
"shares": 35641554,
"comments": 339
}
}
- 质量控制
http://api.facebook.com/method/fql.query?query=select+total_count+from+link_stat+where+url= "http://facebook.com "'
结果:
<?xml version="1.0" encoding="UTF-8"?>
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
<link_stat>
<total_count>35641554</total_count>
</link_stat>
</fql_query_response>
关于facebook - 如何从 facebook 的按钮中获取喜欢的数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4931104/