web

web / ShareCounts / 0.2.8

README.md

Note:  Twitter support is no longer possible as they removed the share count endpoint from the public API.

Note: Due to changes to the facebook API, the share, comment & like values may vary depending on individual user's privacy settings, the total number may be substantially higher than reported.

Table of Contents

  1. Introduction
  2. Examples
  3. Credits

Introduction

Given a URL, returns the number of times that URL has been shared on various social media sites, currently facebook, pinterest, and linkedin. Facebook has more detailed information, including shares, comments, and likes, all others are just number of shares.  Please use the full http://.. syntax to ensure the best possible results.

Input:

  • (Required): Website URL.

Output:

  • Facebook like count. (int)
  • Facebook share count. (int)
  • Pinterest share count. (int)
  • Facebook comment count. (int)
  • LinkedIn share count. (int)

Examples

Example 1.

  • Parameter 1: Major website URL.
"http://wikipedia.org"

Output:

{
  "facebook_likes": 32165,
  "facebook_shares": 18179,
  "pinterest": 5,
  "facebook_comments": 5586,
  "linkedIn": 1110
}

Example 2.

  • Parameter 1: Another major website URL.
"http://buzzfeed.com"

Output:

{
  "facebook_likes": 340749,
  "facebook_shares": 197177,
  "pinterest": 15958,
  "facebook_comments": 61550,
  "linkedIn": 1553
}

Credits

This algorithm uses /util/Url2Text to scrape information from the Pinterest API, LinkedIn API, Facebook Graph API.