socialcount

Get social stats for given url

Usage no npm install needed!

<script type="module">
  import socialcount from 'https://cdn.skypack.dev/socialcount';
</script>

README

NPM version Build Status

socialcount

Synopsis

Get social stats for given url

Supported sources:

  • Facebook
  • Google+
  • Twitter

Feel free to fork, add a new source and send a pull request

Usage

var social = require('socialcount');

var opts = {
  facebook: true,
  plus: true,
  tweets: true,
};

social('http://awesome.io', opts, function(err, res) {
  // facebook
  res.facebook.count; // total
  res.facebook.shareCount;
  res.facebook.likeCount;
  res.facebook.commentCount;

  // tweets
  res.tweet.count;

  // +
  res.plus.count;
});

Installation

$ npm install socialcount

License

The MIT License (see LICENSE)