How do you get the total likes for a URL (Likes and Shares)?

时间秒杀一切 提交于 2019-11-30 15:57:52

I found two ways of doing this. The new way utilizing the graph api appears to be to be to use fql, as the following request shows:

https://graph.facebook.com/fql?q=SELECT url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, comments_fbid, click_count FROM link_stat WHERE url='http://mysite.com/8/the-dali-lama-returns'

The old way, with the Rest API which is in the process of being deprecated:

link.getStats()

https://developers.facebook.com/docs/reference/rest/links.getStats/

tushonline

I know the post is old & not sure if you're only asking on how to incorporate the counter, but here are two things you can surely try.

SharedCount: You can check stats online as well as you can integrate their API. However, its free for approx. 10K API requests a month.

Edit: You can also see this question. https://wordpress.stackexchange.com/questions/133536/display-total-number-of-social-shares

TheBuzzz: You can test any URL online & returns total share counts from popular social media websites & also returns Moz Backlinks.

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!