How to find the google plus one count only (don't need button and g +1 image) using rails
Following code works in ruby
require 'curb' require 'json' hash = {method: "pos.plusones.get",id: "p",params: {nolog: true, id: "http://www.tomanthony.co.uk/", source: "widget", userId: "@viewer", groupId: "@self"}, jsonrpc: "2.0", key: "p", apiVersion: "v1"} result=(Curl::Easy.http_post("https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ", hash.to_json) do |curl| curl.headers['Accept']='application/json' curl.headers['Content-Type']='application/json' curl.headers['Api-Version']='2.2' end) result=JSON.parse(result.body_str) count = result && result['result'] && result['result']['metadata'] && result['result']['metadata']['globalCounts'] && result['result']['metadata']['globalCounts']['count'] ? result['result']['metadata']['globalCounts']['count'].to_i : 0