简体   繁体   English

用Facebook登录,找不到电子邮件

[英]Login with Facebook, email not found

I developing a Login/Inscription with Facebook to my website, and sometime some persons can't register with it. 我使用Facebook在我的网站上开发了一个登录/题词,有时有些人无法向其注册。

So, I saw my logs that contains this sentence " Email not found " that happing when I want to get the email from the Facebook response API. 因此,当我想从Facebook响应API中获取电子邮件时,看到包含此​​句子“ Email not found ”的日志出现了提示。

The code : 编码 :

FB.api('/me',
    {fields: "email,first_name,last_name"},
      function(response) {

    });

But the problem, it's work with 80% of persons, and with some search and filtering, I found that this problem happing when the user does his inscription with phone number os when he/she didn't activate the email. 但是问题出在80%的人身上,并且进行了一些搜索和过滤,我发现当用户在未激活电子邮件时用电话号码os题词时,这个问题就解决了。

The problem here is I need the Email for some reason ( The contact with the user if he/she win). 这里的问题是我出于某些原因需要电子邮件(如果获胜,则与用户联系)。

is there any solution? 有什么解决办法吗?

The fix the problem, the best way is to ask the new user to add Email when he/she registered. 解决问题,最好的方法是让新用户注册时添加电子邮件。

I try to get the phone number if the email not found, but Facebook doesn't give permission to get it. 如果找不到电子邮件,我会尝试获取电话号码,但Facebook不允许获取该电话号码。

More information about that : https://stackoverflow.com/a/11049017/6173086 有关此的更多信息: https : //stackoverflow.com/a/11049017/6173086

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM