Get Facebook share/like/comment count of URL

前端 未结 2 1111
别那么骄傲
别那么骄傲 2021-01-01 05:36

Prior to today, I used the following URL to get the Facebook share/like/comment count of a URL:

https://api.facebook.com/method/links.getStats?format=json&am         


        
2条回答
  •  北海茫月
    2021-01-01 05:59

    It is not currently possible. Facebook is adding likes/shares/comments for URLs and returning them as shared_count. Not possible to return correct number of individual likes/shares/comments, and that is not clear in the Graph API documentation. Not clear if it is a bug or a documentation error.

    The old Rest API that provided this data was turned off on the 18th August.

    There is a comment from a Facebook engineer explaining this in reply to a bug report, in the answer to this Stack Overflow question: Getting Facebook Share, Like and Comment Counts for a Given URL with API Graph v2.6

    You can also subscribe to this bug report at Facebook, but is a bit old with still no solution: https://developers.facebook.com/bugs/748651458568287/

提交回复
热议问题