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 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法