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.
- 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}]
- 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\/"}
- 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}}
- 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"}
- Pinterest: http://widgets.pinterest.com/v1/urls/count.json?source=6&url=%%URL%% returns total pins.receiveCount({"url":"http://qidea.qnimate.com","count":0})
Leave a Reply