Skip to content

Instantly share code, notes, and snippets.

@davidpp
Created April 2, 2013 16:57
Show Gist options
  • Save davidpp/5293946 to your computer and use it in GitHub Desktop.
Save davidpp/5293946 to your computer and use it in GitHub Desktop.
Get current user name + ID with Facebook JS SDK
FB.api('/me', function(response) {
alert("Name: "+ response.name + "\nFirst name: "+ response.first_name + "ID: "+response.id);
var img_link = "http://graph.facebook.com/"+response.id+"/picture"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment