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

后端 未结 3 1784
庸人自扰
庸人自扰 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:45

    This API is no longer available. The answer below is no longer valid.


    I could get stats of a page (say http://techcrunch.com) with just a GET request to API. Just place this GET request http://api.facebook.com/restserver.php?method=links.getStats&urls=[YOUR_URL] and get the stats.

    like http://api.facebook.com/restserver.php?method=links.getStats&urls=http://techcrunch.com/ returns

    
        
            http://techcrunch.com/
            http://www.techcrunch.com/
            6244
            1513
            1391
            9148
            4007
            433841427570
            4
        
    
    

    Hope this helps.


    Also,

    If you want that response as a JSON, just append &format=json to request URL – Dexter
    (from the comment. Thanks Dexter!)

提交回复
热议问题