Skip to content

Instantly share code, notes, and snippets.

@rajivnarayana
Created October 18, 2012 20:09
Show Gist options
  • Save rajivnarayana/3914479 to your computer and use it in GitHub Desktop.
Save rajivnarayana/3914479 to your computer and use it in GitHub Desktop.
Facebook Info with JSONP
<div id="facebook_info" style="border:5px solid blue;">
</div>
<script type="text/javascript">
function load_facebook_info(data) {
document.getElementById("facebook_info").innerHTML = data.likes + "<br/> Like this <br/>" + data.were_here_count + "<br/> were here <br/>" + data.talking_about_count + "<br/> talking about this";
}
</script>
<script src="https://graph.facebook.com/SonomaChickenCoopCampbell?fields=likes,were_here_count,talking_about_count&callback=load_facebook_info"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment