2
I’m using the facebook api to log in and get some user data like name, surname 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 set all permissions and parameters necessary, but it only returns the date when I just facebook where I created the application, I wonder if it is necessary some configuration in the application, or if it is lack of a specific syntax at least.
Thanks man, I will send this request. I really entered a user as a test user and managed to recover the date of birth
– Matheus Lima