I'm using facebook's api to login and get some user data like first name, last name etc.
function apilogin() {
console.log('Welcome! Fetching your information.... ');
FB.api('me/','GET',{fields:'first_name,last_name,email,birthday'}, function(response) {
console.log('Successful login for: ' + response.first_name);
document.getElementById('status').innerHTML =
'<br>Nome: ' + response.first_name + '<br>Sobrenome: '+response.last_name + '<br>email: '+response.email+'<br>Data nascimento: '+response.birthday;
});
<div class="fb-login-button" data-max-rows="2" data-size="large" data-show-faces="false" data-auto-logout-link="false" scope="email,public_profile,user_birthday" onlogin='checkLoginState();' auth-type="rerequest">login com o facebook</div>
I have defined all the permissions and parameters needed, but it only returns the date when I created the application on facebook, I would like to know if any configuration is necessary in the application, or if it is a lack of a specific syntax at least.