Facebook Login Api does not return email even requesting field

Asked

Viewed 46 times

0

My facebook api is not returning email field. I saw in a forum post giving the solution to this problem, requesting the field in the api, but I did it and it does not work.

Login with facebook api does not return user email

Interesting is that when I test site it’s right, and in the air comes as "Undefined" (FIELD ONLY E-MAIL, ALL REMAINING RETURNS NORMAL)

When registering the api in the Facebook settings the API is already by default requesting email to user

Follows code

FB.api('me?fields=email,name,link,picture', function (response) { 
console.log(response)
}):
  • Dude, your code is not the same as the link you posted. scope in Login? In the post the guy passed a second parameter that was an object with the fields instead of concatenating into the URL... This changes the result?

  • Concatenating doesn’t change the result. Also there is no need for Scope on login as much as I said the other fields work and local also works. Strangely now is searching the email, it made no sense. I will monitor to see if it will stop working!

  • [CLOSED] Really fernandosavio, it is necessary to have the fb.login button because it is the Scope that charges e-mail permission when it appears message for user to allow the facebook application. If you don’t use Scope it asks for permission but only charges name and photo (which is the default application)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.