PHP Classes

Facebook not returning email

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement a PH...  >  All threads  >  Facebook not returning email  >  (Un) Subscribe thread alerts  
Subject:Facebook not returning email
Summary:PHP OAuth API
Messages:31
Author:victor
Date:2015-11-28 04:08:41
 
  1 - 10   11 - 20   21 - 30   31 - 31  

  31. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-08-07 04:52:51 - In reply to message 30 from Nick Lüthi
It seems that Facebook applications created a long time ago can return all the profile fields including email even if you do not explicitly request the fields in the API call parameters, as it will support the current minimum version.

Take a look at your App developer page to see what API version it says. For my test app it says 2.0 although it will upgrade 2.1 on August 8.

developers.facebook.com/apps/

Anyway, maybe I should update the example scripts just to request the fields explicitly and it works with all versions.

As for the email scope it is really necessary to pass when requesting authorization, or else it is not returned.

If it is returned when you did not pass the email scope, that is because the user has already authorized your app to provide the email before.

If you remove your app from the user configurations and Facebook to force it to restart the process and you do not ask for the email scope, you can see that it does not return the email address even if you put it in the fields parameters.

 
  1 - 10   11 - 20   21 - 30   31 - 31