
Untitled
By: a guest on
May 8th, 2012 | syntax:
None | size: 0.62 KB | hits: 12 | expires: Never
<?php
/*
*
* As found at: http://dev.firsttube.com/fans-followers.php
*
*/
$fb_username = 'phishnet';
$tw_username = 'phishnet';
$fb = @json_decode(file_get_contents('https://graph.facebook.com/'.$fb_username));
$fb_fans = number_format($fb->likes);
$tw = @json_decode(file_get_contents('http://api.twitter.com/1/users/show.json?screen_name='.$tw_username));
$tw_followers = number_format($tw->followers_count);
?><html>
<head>
<title>Fans and Followers</title>
</head>
<body>
Facebook fan count: <?=$fb_fans;?><br />
Twitter follower count: <?=$tw_followers;?><br />
</body>
</html>