How do you get the total number of Likes and Shares?

The "Likes" plugin that I dumped on my page displays both the number of button clicks and the number of times the page url has been split, or the comment "Comments".

When I use the Graph API to inspect my object, it only shows the number of direct "Like" clicks. Here's an example of an object:

{
   "id": "17678692xxxxxxx",
   "name": "The Dali Lama Returns",
   "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/161984_176786925772923_6855xxxxxxx.jpg",
   "link": "http://mysite.com/8/the-dali-lama-returns",
   "likes": 1,
   "app_id": 478xxxxxxx,
   "category": "Unknown",
   "is_published": true,
   "description": "The Dali Lama will speak, and we will listen.",
   "about": "The Dali Lama will speak, and we will listen.",
   "can_post": true
}

      

This means that after someone has pressed my button and wrote a comment about something like this, the button will display counter "2", but my object will only display the count.

Is there a way to get the full "Like" score displayed on my page?

+3


source to share


2 answers


I found two ways to do this. The new way to use the plot api is to use fql as the following query 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/

+11


source


I know the post is out of date and not sure if you are only asking about how to enable the counter, but here are two things you can surely try.

SharedCount : You can check statistics online and also integrate your 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 and get back the total stocks from popular social media websites as well as get back Moz images.

Hope it helps

0


source







All Articles