Get the number of facebook *shares* of a specific URL

后端 未结 3 1798
庸人自扰
庸人自扰 2020-12-13 07:08

I\'ve found some discrepancies in the graph api and was wondering if anybody has been able to work around them.

https://graph.facebook.com/?id=http://www.imdb.com/ti

3条回答
  •  没有蜡笔的小新
    2020-12-13 07:48

    You need to use Facebooks' FQL with table link_stat. Use something similar to this

    SELECT
    url, normalized_url,
    share_count, like_count, comment_count, total_count,
    commentsbox_count, comments_fbid, click_count
    FROM link_stat
    WHERE url="http://www.imdb.com/title/tt0117500/"
    

    This is the result for that query (in XML format, you can of course get it in JSON)

    
    
      
        http://www.imdb.com/title/tt0117500/
        http://www.imdb.com/title/tt0117500/
        6233
        9500
        2179
        17912
        6
        380728101301
        164
      
    
    

    The total_count (17912) is the number you are looking for.

提交回复
热议问题