I have this code to try getting the user's name
FB.api('/me', function(response) {
console.log('Successful login for: ' + response.name);
});
but the answer that the console gives me is:
Successful login for: undefined
without the .name the answer is:
Successful login for: [object Object]
that is, the response.name returns to me as undefined ... I have already verified that the user is connected and everything but I could not get their basic information, there was another way that I asked for a token that could not be obtained but anyway this method should work because it is the same example that gives me the documentation of the Facebook api.