I am trying to use the graph API to get just some basic info about a user no need for authorization by the user just the public details. I am trying to use jQuery and the .getJS
It doesn't return an array, but an object. You don't need to be looping over anything.
You can just get the name straight from the object:
$.getJSON(fburl, function(data){
var name = data["name"];
$("#profile").append(""+name+"
");
});
example: http://jsfiddle.net/niklasvh/Wm9M3/
PS. you had a syntax error with $("#profile").append("
as well (you forgot the "+name+"
");+
around name
)