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  

  1. Facebook not returning email   Reply   Report abuse  
Picture of victor victor - 2015-11-28 04:08:41
Hi, I understand that the email scope has been included in login_with_facebook.php but facebook is not returning any email, any suggestions?

  2. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-11-28 04:30:07 - In reply to message 1 from victor
If you added the email scope after getting the token, you need to obtain a new token.

In that case, you should call ResetAccessToken to make the class discard the old token.

Please do not post the same message in different threads.

  3. Re: Facebook not returning email   Reply   Report abuse  
Picture of Scott Kallen Scott Kallen - 2015-12-03 18:37:34 - In reply to message 1 from victor
Strangely, I am getting the same issue. I have email set but I am only getting name and access token. NO other data, despite my scope being:

"email,publish_actions,user_friends"

Any help is appreciated!



Scott.

  4. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-12-03 21:12:31 - In reply to message 3 from Scott Kallen
Did you start over, and called ResetAccessToken before getting a new token?

  5. Re: Facebook not returning email   Reply   Report abuse  
Picture of Scott Kallen Scott Kallen - 2015-12-03 21:22:05 - In reply to message 4 from Manuel Lemos
This is fresh code. No previous access code. I went directly to the "login_with_facebook.php" and got this:

----------------------------------------------------
Scott Xxxxxx you have logged in successfully with Facebook!

stdClass Object
(
[name] => Scott Xxxxxx
[id] => [xxxxxxxxxxxxxxxxxx]
)
stdClass Object
(
[id] => [xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxx]
)
-----------------------------------------------------

Where my name was my name and the IDs were my ids were actual numbers, of course. But that's all it's returning. I tried again after logging out of Facebook, clearing my cache and restarting Safari.

  6. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-12-04 01:35:24 - In reply to message 5 from Scott Kallen
Couldn't that be because the Facebook user disallowed to share the email address? Users may selectively allow or deny certain permissions.

  7. Re: Facebook not returning email   Reply   Report abuse  
Picture of Scott Kallen Scott Kallen - 2015-12-04 04:54:24 - In reply to message 6 from Manuel Lemos
The Facebook user in question was myself. And I approved anything the app asked of me.

  8. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-12-04 21:09:46 - In reply to message 7 from Scott Kallen
Maybe you think you did but you didn't.

I suggest going to your user account and remove the application, so you can start over.

  9. Re: Facebook not returning email   Reply   Report abuse  
Picture of Yusuke7 Yusuke7 - 2015-12-04 23:24:37 - In reply to message 8 from Manuel Lemos
I have the same problem :-/

in "access popup" all checkboxes is checked ( "personal information", "email" )

But getting only "id" and "name" :(

  10. Re: Facebook not returning email   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-12-04 23:39:45 - In reply to message 9 from Yusuke7
What exactly is the value that you are setting the class scope variable?

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