doutuobao4004 2014-04-12 23:35
浏览 112
已采纳

它可能无法在Facebook登录中获取用户电子邮件?

Im with a problem using the Facebook PHP SDK to implement Facebook Login on a Site.

I use an email to identify the users of my app. SO, when a new user logins with Facebook I search if his mail is in the database, if not i create a new user.

The problem is that a small number of users (2 specifically) have problems with the login system. When i checked the database (in the "users" table), i noticed that they have accounts created, but wihouth the email.

The question is: Is possible to not have access to an email of a facebook user if he gave the permissions to the app?

If this is true, exist some kind of solution to use Facebook Login in a system that stores the user with this table?:

email | password | name

Thanks. Sorry for the bad english.

  • 写回答

1条回答 默认 最新

  • douweilaton2762 2014-04-13 09:20
    关注

    Yes, it is possible that you'll not receive the email of a facebook user inspite of the fact that he gave the required permission to the app.

    But chances are very minute (as you've mentioned too- a small number of users (2 specifically) have problems with the login system)

    The reason for that? Follow this discussion- Register with Facebook sometimes doesn't provide email

    Solution?

    It depends why exactly you need an email. If its just an identifier for a user, you can save the username or id of the user (yes those are unique). Yet, this will just be an identifier- but since for the cases you are not getting email, you cant do anything else about that, right?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历