Title: Wrong facebook emails
Last modified: February 26, 2018

---

# Wrong facebook emails

 *  Resolved [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/)
 * Hello,
 * I am using your plugin and I have an issue with some of the users. Their email
   is not properly retrieved from facebook. They get a mail like [1234567890@facebook.unknown](https://wordpress.org/support/topic/wrong-facebook-emails/1234567890@facebook.unknown?output_format=md)
   instead, where 1234567890 is their facebook number ID.
 * I can reproduce this issue if I uncheck the email in the window showing at the
   first facebook login. However, they say they did not uncheck anything.
 * Any idea please ? I need them to retrieve their real email in order to work properly
   with my website.
 * Thank you for reading 😊

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/wrong-facebook-emails/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wrong-facebook-emails/page/2/?output_format=md)

 *  Plugin Author [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * (@nextendweb)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10014458)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/),
    that sounds
   strange. It can happen if the Facebook user rejects the email permission or email
   permission is not requested or the email address is not verified. Also, I read
   similar issue when an older API version was set on the Facebook App.
 * #1 Could you check what is your current API version of your APP? Here you can
   find: [https://i.imgur.com/pnRPlOh.png](https://i.imgur.com/pnRPlOh.png)
 * #2 Another thing you could check:
    Note the User ID who has the unknown email
   address. For example, User ID: **10** Head over to PHPMYADMIN and `wp_usermeta`
   table and search for: `user_id` -> **10** and `meta_key`-> `fb_user_access_token`
   Then copy the meta_value into the following url and replace `meta_value` `https://
   graph.facebook.com/me/permissions?access_token=<strong>meta_value</strong>&debug
   =all` It should print out what permissions are granted by that user.
 * It would be great if you could share with us your result!
 *  Plugin Author [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * (@nextendweb)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10014507)
 * [@gingerbooch](https://wordpress.org/support/users/gingerbooch/),
    here are another
   Facebook docs: [https://developers.facebook.com/docs/facebook-login/permissions/#reference-email](https://developers.facebook.com/docs/facebook-login/permissions/#reference-email)
 * It states:
 * > Note, even if you request the email permission it is not guaranteed you will
   > get an email address. For example, if someone signed up for Facebook with a
   > phone number instead of an email address, the email field may be empty.
 * If it turns out that it is not a bug: Pro Addon has a setting which allows you
   to request a valid email address from the user when Facebook does not provide
   it. You can read more on [Request email feature in our docs](https://nextendweb.com/nextend-social-login-docs/pro-settings/).
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10016952)
 * Hi [@nextendweb](https://wordpress.org/support/users/nextendweb/) and thank you
   for your fast answer.
 * My current API version is 2.12 .
 * Then I past the following :
    `{"access_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","
   token_type":"bearer","expires_in":XXXXXXX,"created":XXXXXXXXXX}`
 * Into the adress like this :
    `https://graph.facebook.com/me/permissions?access_token
   =<strong>{"access_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","
   token_type":"bearer","expires_in":XXXXXXX,"created":XXXXXXXXXX}</strong>&debug
   =all`
 * Results :
 *     ```
       message	"Invalid OAuth access token."
       type	"OAuthException"
       code	190
       fbtrace_id	"XXXXXXXXXXX"
       ```
   
 * Did I put the right thing into the adress ? I put the whole value.
    Did I missconfig
   my API somewhere ?
 * Thank you for your help.
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).
 *  [Ramona](https://wordpress.org/support/users/nextend_ramona/)
 * (@nextend_ramona)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10016991)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * You should use just the access token, not the whole meta_value. E.g. if the access
   token is SdeXadsfr then you should use the link this way:
    `https://graph.facebook.
   com/me/permissions?access_token=SdeXadsfr&debug=all`
 * Although your case will probably happen because of the previous comment, which
   links to the official Facebook docs: [https://developers.facebook.com/docs/facebook-login/permissions/#reference-email](https://developers.facebook.com/docs/facebook-login/permissions/#reference-email)
   
   That even with the correct permission there’s no guarantee that the email address
   will be sent by Facebook.
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017006)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/),
 * Here is the real result :
 *     ```
       data	
       0	
       permission	"email"
       status	"granted"
       1	
       permission	"public_profile"
       status	"granted"
       __debug__	
       messages	
       0	
       link	"https://developers.facebook.com/docs/apps/versions/"
       message	"No API version was specified. This request defaulted to version v2.12."
       type	"warning"
       ```
   
 * Is there something wrong ?
    I understand the limitations of the service.
 *  [Ramona](https://wordpress.org/support/users/nextend_ramona/)
 * (@nextend_ramona)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017010)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * The email permission was granted so if it would be available, Facebook would 
   have sent it back.
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017041)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/)
 * I compared with another account where the good email is retrieved.
    The result
   is the same.
 * Then I’m looking on your Pro Addon for asking the email on registration.
    The
   thing is, looking to the previous test, I’m not sure your addon will make a difference
   between wrong and good email. Would I need to always ask for email adress in 
   that case ?
 * Is it possible to try it with a 1 hour licence or something ?
 * Thank you
 *  [Ramona](https://wordpress.org/support/users/nextend_ramona/)
 * (@nextend_ramona)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017133)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * I think you misunderstood what is happening.
 * Even if the user who signs up does grant permission for you app, that doesn’t
   mean that the users actually have an email address which Facebook can send back.(
   For instance, if they logged in via mobile, they might never entered an email
   address as they can simply log in by entering their phone number.) This happened
   with the user whose information you pasted.
    Since there is no email address 
   that Facebook could send – it won’t send any.
 * And since WordPress doesn’t allow profiles without email address, our code generates
   a unique email address for the users, if nothing is sent back.
    So it’s not a
   matter of wrong or right email address. It’s matter of **any email address returned**
   or **no email address returned** by Facebook.
 * So basically here’s the four cases that could happen:
    **1. The email address
   is entered by the user**
 * 1/a The app has permission to access the email address
    -> Facebook returns the
   email address
 * 1/b The user does not give permission to the app to access the email address
   -
   > Facebook does not return the email address – -> our code generates a custom
   address because a unique email address is required to register a WordPress user
 * **2. The email address is not given by the user**
 * 2/a The app has permission to access the email address
    -> Facebook cannot return
   the email address since it’s not entered – -> our code generates a custom address
   because a unique email address is required to register a WordPress user
 * 2/b The user does not give permission to the app to access the email address
   -
   > Facebook does not return the email address – -> our code generates a custom
   address because a unique email address is required to register a WordPress user
 * Your case is 2/a.
 * At the Pro Addon there is an option to ask email address upon registration “When
   email is not provided or empty” (which basically covers the last three cases)
   and if such thing happens, the users need to enter their email address in order
   to register.
 * Unfortunately, you we don’t have such one hour license or other ways to “temporarily”
   try the Pro Addon.
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017200)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/),
 * Thanks for the details. I thought that the email adress was generated by Facebook.
   
   Actually my case is not listed. The user gave permission to the app to access
   the email address. And the user has an email adress inside his Facebook profile.
 *  [Ramona](https://wordpress.org/support/users/nextend_ramona/)
 * (@nextend_ramona)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017239)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * In that case, Facebook should return the email address. Since this didn’t happen,
   there was either nothing to be returned or there was no permission to do so.
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017251)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/),
 * I don’t understand why his Facebook adress is not returned. Is there another 
   place to set a permission for this ? Except the login box wich is accepting.
 *  [Ramona](https://wordpress.org/support/users/nextend_ramona/)
 * (@nextend_ramona)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017264)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * The app permissions are set upon registration. I’m not aware of any other way
   where Facebook would refuse to return the email address upon request.
 * In any case, the Pro Addon will solve your problem, as it will make the users
   enter an email address if there’s nothing returned by Facebook.
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10017280)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/),
 * Yes if it is a bug your addon should help.
    The plugin is on testing actually,
   and I have some users testing with me.
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).
 *  Plugin Author [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * (@nextendweb)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10019530)
 * Hi [@gingerbooch](https://wordpress.org/support/users/gingerbooch/),
    I’m still
   trying to figure out what could cause this.
 * I created a fake Facebook user today with phone number only. In this case, the
   email address was empty. Then I added an email address. I still got empty email
   address. Then I confirmed this email address and I was able to get the email 
   address as expected.
 * Then I checked our users and I found several Facebook account which give the 
   email prermission, but the email address not returned by the api. I used the 
   official Facebook graph tester, so it is not a bug in Nextend Social Login. Here
   is an example result: [https://i.imgur.com/7sRWoLS.png](https://i.imgur.com/7sRWoLS.png)
   
   This user gave access to his email, but Facebook does not return it. Except it
   shows the blue box that `The email field was not returned. This may be because
   the email was missing, invalid or hasn't been confirmed.`
 * I read the following: `I had similar problem & I found the cause for this. This
   problem occurs for users who have not set their Primary Email Address (They have
   many email address but they haven’t pointed out which is their primary email 
   address) under General Account setting tab.
 * I tried using such accounts on various famous sites which has Facebook login &
   even they couldn’t retrieve the email address from such accounts.`
 * It might be that the user has several email address on the account, but non of
   the primary. (Maybe in the past, Facebook had an update and some people left 
   without primary address.)
 * So, if we follow this clue, here is how my contact settings look like in Facebook:
   [https://i.imgur.com/XwAGQHt.png](https://i.imgur.com/XwAGQHt.png)
 * Could you provide a screenshot of the same page from a user who has the missing
   email issue? Then you should pick an email if non selected and then save this
   setting. Maybe after that the email address will be reachable. You can check 
   it with the url: `https://graph.facebook.com/v2.12/me?fields=id,name,email&access_token
   ={here comes the access token}`
 *  Thread Starter [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * (@gingerbooch)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/#post-10021331)
 * Hi [@nextendweb](https://wordpress.org/support/users/nextendweb/),
 * Thank you for your support.
    I have two users with that problem, please check
   the link : [https://imgur.com/a/H3ZYp](https://imgur.com/a/H3ZYp) They both have
   a primary e-mail address. The difference I can see with my working account, same
   as yours, is that they have not set their “account name”. This is used to make
   a permalink instead of using your number ID to link to your profile.
 *     ```
       https://www.facebook.com/ACCOUNT_NAME
       https://www.facebook.com/profile.php?id=XXXXXXXXXXXXXXX
       ```
   
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).
    -  This reply was modified 8 years, 3 months ago by [gingerbooch](https://wordpress.org/support/users/gingerbooch/).

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/wrong-facebook-emails/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wrong-facebook-emails/page/2/?output_format=md)

The topic ‘Wrong facebook emails’ is closed to new replies.

 * ![](https://ps.w.org/nextend-facebook-connect/assets/icon.svg?rev=3336394)
 * [Nextend Social Login and Register](https://wordpress.org/plugins/nextend-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-facebook-connect/reviews/)

 * 26 replies
 * 3 participants
 * Last reply from: [gingerbooch](https://wordpress.org/support/users/gingerbooch/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/wrong-facebook-emails/page/2/#post-10036050)
 * Status: resolved