Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jkishner/5367308 to your computer and use it in GitHub Desktop.
Save jkishner/5367308 to your computer and use it in GitHub Desktop.
Put this code on your server, call it fans.php, then added it as an html (diy) widget in StatusBoard. inspired by http://stackoverflow.com/questions/7439966/show-twitter-followers-in-plain-text
<html><body>
<?php
function fbfan() {
$pageID = 'ENTER_YOURS_HERE';
$info = json_decode(file_get_contents('http://graph.facebook.com/' . $pageID));
echo $info->likes;
}
?>
You have <?php fbfan(); ?> Facebook fans!
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment