Skip to content

Instantly share code, notes, and snippets.

View PoTHuYJoHN's full-sized avatar

Ivan Kolodiy PoTHuYJoHN

View GitHub Profile
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@mhawksey
mhawksey / gist:3833072
Created October 4, 2012 11:35
Bulk collect social share counts from Facebook, Twitter, Delicious, Pinterest and Google +1s and return json
<?php
$url = $_GET['url'];
$finfo = json_decode(file_get_contents('http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&urls='.$url.'&format=json'));
$tinfo = json_decode(file_get_contents('http://urls.api.twitter.com/1/urls/count.json?url='.$url));
$dinfo = json_decode(file_get_contents('http://feeds.delicious.com/v2/json/urlinfo/data?url='.$url));
$pinfo = json_decode(preg_replace('/^receiveCount\((.*)\)$/', "\\1",file_get_contents('http://api.pinterest.com/v1/urls/count.json?callback=receiveCount&url='.$url)));
$gplus = gplus_shares($url);
//http://papermashup.com/google-plus-php-function/