Skip to content

Instantly share code, notes, and snippets.

Piotr Kunicki piotrkunicki

  • Poland
Block or report user

Report or block piotrkunicki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@piotrkunicki
piotrkunicki / index.php
Created Dec 8, 2015
Get facebook counters from url.
View index.php
<?php
$source_url = "http://facebook.com/".$facebook_username;
$url = "http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($source_url);
$xml = file_get_contents($url);
$xml = simplexml_load_string($xml);
$shares = $xml->link_stat->share_count;
$likes = $xml->link_stat->like_count;
$comments = $xml->link_stat->comment_count;
$total = $xml->link_stat->total_count;
$max = max($shares,$likes,$comments);
You can’t perform that action at this time.