ShareChecker
The easiest way to check how many times a URL has been shared on Twitter, Facebook, Vkontakte and Odnoklassniki.
Install
gem 'share_checker'
Configure
ShareChecker.setup do |config|
config.vkontakte = { :app_id => 00000 }
config.timeout = 30
config.user_agent = 'ShareChecker Robot'
end
Usage
Supported providers: twitter, facebook, vkontakte and odnoklassniki:
ShareChecker.check("facebook", "SHARED_URL")
ShareChecker::Providers::Twitter.new("SHARED_URL").check
Overwride default options:
ShareChecker.check("vkontakte", "SHARED_URL", { :app_id => 00001 })
Dependences
-
sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev
Test
rake spec
Copyright © 2011 Aimbulance, released under the MIT license