From what I gather the following two will bring back the same result
FB.api
FB.api('/'+user_id, function(response){
document.getElementById('name').innerHTML = 'Your name is ' + respone.name;
});
FB.Data.Query
var query = FB.Data.query('select name, uid from user where uid={0}',user_id);
query.wait(function(rows) {
document.getElementById('name').innerHTML =
'Your name is ' + rows[0].name;
});
So what is the difference between these two, what case would one be preferable over the other?
From the docs,
Basically you can use FB.Data.Query when you want to perform some kind of an advanced query using FQL. Read more here.