3
我一直在四處尋找一種方法來檢索以純文本谷歌加頁「plusoners」或追隨者,但我不能找到任何東西。讓追隨者在谷歌加
我在尋找類似facebook的圖形和Twitter的API的方法。
這可能嗎?
UPDATE
我發現這個劇本,但它取了「加一」的網站。是否有可能讓此腳本打印Google +頁面的追隨者數量?
<?php
$url = "http://www.tomanthony.co.uk/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://clients6.google.com/rpc?key=******");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
$curl_results = curl_exec ($ch);
curl_close ($ch);
$parsed_results = json_decode($curl_results, true);
echo $parsed_results[0]['result']['metadata']['globalCounts']['count'];
?>
您可以使用這裏爵提供http://stackoverflow.com/questions/8811369/google-plus-followers-in-plain-text鏈接 – dikirill