Skip to content

Check how many times a page/URL has been shared on social networks and aggregators

License

Notifications You must be signed in to change notification settings

bboroda/share-counter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Version Code Climate Test Coverage Build Status

ShareCounter

Returns the number of shares for a link from

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • Reddit
  • Delicious
  • StumbleUpon
  • Pinterest

Listed on RubyGems

Issue reports, feature requests and pull requests welcome.

Spiritual successor to the Share Counts gem.

Installation

gem install share-counter

Usage

2.1.1 :001 > require 'share-counter'
2.1.1 :002 > url = 'http://rinse.fm'

# get all
2.1.1 :003 > counts = ShareCounter.all url
 => {:reddit=>9, :twitter=>25042, :facebook=>37699, :linkedin=>154, :googleplus=>1, :delicious=>-1, :stumbleupon=>2087, :pinterest=>0}

# note delicious count. -1 means an error prevented the count being retrieved

# get specific networks
2.1.1 :004 > counts = ShareCounter.selected url, [:facebook, :linkedin]
 => {:facebook=>37699, :linkedin=>154}

# get one network
2.1.1 :005 > ShareCounter.twitter url
 => 25042

About

Check how many times a page/URL has been shared on social networks and aggregators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%