970_90

Sunday, 12 April 2015

Share count and Share URL of Facebook, Twitter, LinkedIn and Pinterest

Share count and Share URL of Facebook, Twitter, LinkedIn and Pininterest.

Share Count: There are different free api to get the share count of Facebook, Twitter, Linkedin and Pininterest. These number number of counts by all users.

Facebook Share (33)
http://graph.facebook.com/?id=http://www.web-technology-experts-notes.in

Response:
{
   "id": "http://www.web-technology-experts-notes.in",
   "shares": 33
}


Twitter Share (7)
http://cdn.api.twitter.com/1/urls/count.json?url=http://www.web-technology-experts-notes.in

Response:
{"count":7,"url":"http:\/\/www.web-technology-experts-notes.in\/"}


Linkedin Share (6)
 https://www.linkedin.com/countserv/count/share?format=json&url=http://www.web-technology-experts-notes.in
Response:
 {"count":6,"fCnt":"6","fCntPlusOne":"7","url":"http:\/\/www.web-technology-experts-notes.in"}


Pinterest Share (0)
 http://api.pinterest.com/v1/urls/count.json?callback=x&url=http://www.web-technology-experts-notes.in
Resonse:
 x({"url":"http://www.web-technology-experts-notes.in","count":0})





Share URL:Each Social Services (Facebook, Twitter, Linkedin and Pininterest), have its own sharing URL and its work on all global browsers.

Facebook Share (33)
http://www.facebook.com/sharer.php?u=http://www.web-technology-experts-notes.in


Twitter Share (7)
http://www.twitter.com/share?url=http://www.web-technology-experts-notes.in


Pinterest Share (0)
http://pinterest.com/pin/create/button/?media=http://www.web-technology-experts-notes.in


Linkedin Share (6)
http://www.linkedin.com/cws/share?url=http://www.web-technology-experts-notes.in




Share on Twitter with Custom Text
https://twitter.com/intent/tweet?text=this%20is%20custom%20text&url=web-technology-experts-notes.in


Share on Twitter with Custom Text and Via
https://twitter.com/intent/tweet?text=this%20is%20text&via=this_is_via&url=http://www.domain.com


2 comments:

  1. Question: how to get the +1 count in google plus using any API
    http://share.yandex.ru/gpp.xml?url=http://www.web-technology-experts-notes.in
    https://plusone.google.com/_/+1/fastbutton?url=http://www.web-technology-experts-notes.in

    ReplyDelete
  2. For Facebook, if you don't want the total (likes, comments and shares) you can use this url https://api.facebook.com/method/fql.query?query=select%20like_count,%20click_count,%20comment_count,%20share_count,%20total_count%20from%20link_stat%20where%20url=%27http://google.com%27&format=json (remove the "&format=json" for a xml version)

    ReplyDelete