QNimate

  • CoursesVideos
  • WP PremiumPlugins
  • DemosLab
  • Bitcoin BankingBuy, Sell, Store and Earn Interest
  • Home
  • QIdea
  • QTrack
Home Carbon Ads Retrieving Social Shares, Likes And Comments Count Of A URL

Retrieving Social Shares, Likes And Comments Count Of A URL

Many websites displays the total number of likes, shares and comments of the currently viewed URL. This data is very helpful to make the visited user also share the URL like other did.

Here are the HTTP REST APIs provided by different social networking sites using which you can retrieve all these social activity information of an URL.

  1. Facebook: https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json returns total shares, likes and comments.
    [{"url":"http:\/\/qnimate.com","normalized_url":"http:\/\/www.qnimate.com\/","share_count":10,"like_count":0,"comment_count":0,"total_count":10,"click_count":0,"comments_fbid":386649511476376,"commentsbox_count":0}]
  2. Twitter: http://urls.api.twitter.com/1/urls/count.json?url=url=%%URL%% returns total retweeted and tweeted counts.
    {"count":2,"url":"http:\/\/qnimate.com\/"}
  3. Reddit: http://buttons.reddit.com/button_info.json?url=%%URL%% returns up’s, down’s, comments etc.
    {"kind": "Listing", "data": {"modhash": "ebxbqzdtp12399474be45c2aa7d5894323c418706820a881e8", "children": [{"kind": "t3", "data": {"domain": "qidea.qnimate.com", "banned_by": null, "media_embed": {}, "subreddit": "SEO", "selftext_html": null, "selftext": "", "likes": true, "user_reports": [], "secure_media": null, "link_flair_text": null, "id": "2gqwcb", "gilded": 0, "secure_media_embed": {}, "clicked": false, "report_reasons": null, "author": "narayanprusty", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2qhbx", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "mod_reports": [], "saved": false, "is_self": false, "name": "t3_2gqwcb", "permalink": "/r/SEO/comments/2gqwcb/content_idea_generator/", "stickied": false, "created": 1411060380.0, "url": "http://qidea.qnimate.com", "author_flair_text": null, "title": "Content Idea Generator", "created_utc": 1411031580.0, "ups": 1, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}], "after": null, "before": null}}
  4. LinkedIn: http://www.linkedin.com/countserv/count/share?url=%%URL%%&format=json returns total comments, shares etc.

    {"count":1,"fCnt":"1","fCntPlusOne":"2","url":"http:\/\/qidea.qnimate.com"}
  5. Pinterest: http://widgets.pinterest.com/v1/urls/count.json?source=6&url=%%URL%% returns total pins.

    receiveCount({"url":"http://qidea.qnimate.com","count":0})
Sep 20, 2014Narayan Prusty
Redis Permanent StorageResponse Tabs - Horizontal and Vertical

Leave a Reply Cancel reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

Narayan Prusty

I am a full-stack web developer. I specialize in Blockchain and JavaScript. This is my personal blog where I write about programming and technologies that I learn and feel interesting to share.

6 years ago API
Share this
0
GooglePlus
0
Facebook
0
Twitter
0
Linkedin
Related Articles
  • SEO For Multi-language and Multi-Currency Websites
  • Twitter Cards Meta Tags Tutorial
  • PageSpeed Insights API
  • Facebook Open Graph Meta Tags Tutorial
  • Login Using Facebook Tutorial
Our Sponsor
Freelance: I am available
@narayanprusty
Hi, I am a full-stack developer - focusing on JavaScript, WordPress, Blockchain, DevOps, Serverless and Cordova. You can outsource your app development to me.





Will get back to you soon!!!
WordPress
ReactJS
Meteor
Blockchain
Serverless
Kubernetes
DevOps
DB & Storage
Ejabberd
Let's get started
My Books

2014 - 2015 © QNimate
All tutorials MIT license