If your application needs to count the number of shared, this gem can help you.
Add to your Gemfile and run the bundle
command to install it.
gem "sharer"
Sharer's Git repo is available on GitHub, which can be browsed at:
http://github.com/14113/sharer
and cloned with:
git clone git://github.com/14113/sharer.git
Call Sharer in an Model and pass the url of the website.
site = Sharer::Site.new("google.com")
number_of_likes = site.facebook_likes
number_of_shares = site.facebook_shares
number_of_tweets_buttons = site.twitter_button
number_of_linkedin_shares = site.linked_in_share
# or all together by threads
hash = site.find_all
This will find count of shareing in facebook, twitter abd linkedin.
This gem is created by Adam Martinik and is under the MIT License.