Below code gives me an 'undefined' on the name and email. However the user IS logged in because I DO have the access token and UID?
function getToken(){
FB.login(function(response) {
if (response.authResponse) {
var access_token = response.authResponse.accessToken;
var uid = response.authResponse.userID;
document.getElementById('accessToken').value=access_token;
document.getElementById('uid').value=uid;
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.' +response.email);
});
document.forms['token'].submit();
} else {
return false;
}
}, {scope:'email,user_likes,friends_likes'});
}
When I output the complete response of fb.api to console I get
[11:46:10.369] ({error:"load-error: unknown"})