Sha256: c670a40a6be6d7444785bacd2610bf1dff4409022b95b81e6fed69009da2e9a4

Contents?: true

Size: 488 Bytes

Versions: 2

Compression:

Stored size: 488 Bytes

Contents

module Virility
	class Facebook < Context
		BASE_URL = "https://api.facebook.com/method/fql.query?query=SELECT+url%2C+normalized_url%2C+share_count%2C+like_count%2C+comment_count%2C+total_count%2C+commentsbox_count%2C+comments_fbid%2C+click_count+FROM+link_stat+WHERE+url%3D"

		def poll
			@response = self.class.get("#{BASE_URL}%22#{@url}%22")
			@results = @response.parsed_response["fql_query_response"]["link_stat"]
		end
		
		def count
			@results["total_count"] || 0
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virility-0.0.6 lib/virility/strategies/facebook.rb
virility-0.0.5 lib/virility/strategies/facebook.rb