Skip to content

Instantly share code, notes, and snippets.

View Vaibhav2103's full-sized avatar
๐Ÿ˜ƒ
I may be slow to respond.

Vaibhav Bhavsar Vaibhav2103

๐Ÿ˜ƒ
I may be slow to respond.
View GitHub Profile
@Vaibhav2103
Vaibhav2103 / API.md
Created March 11, 2018 17:02 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@Vaibhav2103
Vaibhav2103 / gist:0bcfce3c0278d2fc6eb8a34d200d3a19
Created November 15, 2017 12:06 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter