node package manager



Returns JSON with a number of shares for a URL.

    "facebook": 5461703,
    "vk": 2462,
    "odnoklassniki": 547,
    "pinterest": 60,
    "linkedin": 18113


var countShares = require( 'count-shares' );
countShares.get( {
    url: '',
    accessTokens: {
        fb: 'foobar'
}, function( err, result ) {  } );


get( conf, callback[, networks] )

conf: {Object} An object defining config needed to make requests to different APIs.

conf.url: {String} full URL. and are different websites for Twitter and Odnoklassniki.

conf.accessTokens.fb: {String} a valid facebook access token

Twitter's old endpoint stopped work on November 20th, 2015, and according to this post there are no plans to replace it with anything in the short term.

callback( err, result ): {Function} callback that will get the results and errors (if any)

networks: (optional) {Array} or {String} available networks: facebook, linkedin, odnoklassniki, pinterest, vk (vkontakte). Need more? Contribute!