Sha256: 4bd0fb109cc9c8bf9a442894a79627cb9cc475079ff7c0618c4ad5aec9a991a3

Contents?: true

Size: 302 Bytes

Versions: 2

Compression:

Stored size: 302 Bytes

Contents

module Popularity
	class Facebook < Crawler
    stats :shares, :comments

    def shares
      response_json['shares'].to_f.to_i
    end

    def comments
      response_json['comments'].to_f.to_i
    end

    protected

    def request_url
     "http://graph.facebook.com/?id=#{@url}"
   end
 end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
popularity-0.3.0 lib/popularity/networks/facebook.rb
popularity-0.2.1 lib/popularity/networks/facebook.rb