Module: Exoteric::Facebook
- Defined in:
- lib/exoteric/counters/facebook.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.id ⇒ Object
3 4 5 |
# File 'lib/exoteric/counters/facebook.rb', line 3 def self.id :facebook end |
Instance Method Details
#facebook_count ⇒ Object
11 12 13 14 15 16 |
# File 'lib/exoteric/counters/facebook.rb', line 11 def facebook_count res = RestClient.get(facebook_url) JSON.parse(res.to_str)[url]['shares'].to_i rescue 0 end |
#facebook_url ⇒ Object
7 8 9 |
# File 'lib/exoteric/counters/facebook.rb', line 7 def facebook_url "http://graph.facebook.com/?ids=#{url}" end |