获取的Google+股没有API密钥的每一页? [英] Get Google+ shares without API key for each page?
问题描述
在搜索结果页,我想获得的Google+股份数为每个搜索结果项的通过Ajax的URL。我已经成功地设置了计数功能的Facebook和Twitter的:
On a search result page I would like to get the count of Google+ shares for the URL of each search result item via Ajax. I already managed to set up counting functions for Facebook and Twitter:
$.getJSON('http://urls.api.twitter.com/1/urls/count.json?url=' + url + '&callback=?', function(data){
tweets = data.count;
});
$.getJSON('https://api.facebook.com/method/links.getStats?urls='+ url+'&format=json', function(data){
fblikes = data[url].shares;
});
有关Google+的我也已经找到了解决办法,但这需要的API密钥对每个URL。有没有什么办法来检索的Google+计数,而这样的关键?使用它吨动态加载搜索结果,当然我不能创建一个API密钥为每个搜索结果的网址。
For Google+ I also already found a solution, but this requires the API Key for each URL. Is there any way to retrieve the Google+ count without such a key? Using it for tons of dynamically loaded search results, of course I cannot create an API key for each search result URL.
推荐答案
是的,有可能获得谷歌+1计数。他们通过JSON-RPC POST调用检索。
Yes, it's possible to get Google +1 counts. They are retrieved via a JSON-RPC POST call.
POST网址:
https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ
帖子正文:
<$c$c>[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"%%URL%%","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]$c$c>
其中, %% URL %%
是所需的URL。
where %%URL%%
is the desired URL.
看一看下面的:
- <一个href="http://stackoverflow.com/questions/21524077/getting-google-1-page-shares-via-ajax-hidden-api/21866500#21866500">Getting通过AJAX(隐藏API) 谷歌+1页股
- http://www.sharedcount.com/documentation.php
- Getting google +1 Page shares via AJAX (hidden Api)
- http://www.sharedcount.com/documentation.php
这篇关于获取的Google+股没有API密钥的每一页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!