如何从像facebook这样的facebook上获得喜欢的数量?

iva*_*van 21 facebook facebook-like

如何从像facebook这样的facebook上获得喜欢的数量?有没有办法做到这一点?

Jas*_*ore 26

有两种方法可以获得facebook喜欢的数量.

  1. 图API

http://graph.facebook.com/?ids=http%3a%2f%2ffacebook.com

结果是JSON :(出于某种原因'喜欢'被称为'共享')

{
   "http://facebook.com": {
      "id": "http://facebook.com",
      "shares": 35641554,
      "comments": 339
   }
}
Run Code Online (Sandbox Code Playgroud)
  1. FQL

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>
Run Code Online (Sandbox Code Playgroud)