doufu2496 2014-05-30 04:46
浏览 53
已采纳

Facebook登录:我的应用程序应该使用哪个参数来识别用户? id或电子邮件?

So right now I'm identifying the user via their email [given that they allow it during the Facebook log in process]. But I feel people are able to change their main email address associated with their account, and if they do, it might mess up my app.

So is it better to use their Facebook id instead of email? I believe id is permanent and unique to an individual's Facebook account, correct?

$user['email'] or $user['id']?

  • 写回答

1条回答 默认 最新

  • donglin7383 2014-05-30 04:51
    关注

    Yes, the correct way to identify users (And use as Primary Key in your databases) is with the Facebook Id.

    Email people can change and there is people that don't have an email on Facebook.

    Another advantage of using the ID, is that you don't need the users to give you access to their email (it's a different permission). Some people might not want to do that!

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

报告相同问题?

悬赏问题

  • ¥15 Android Studio中如何把H5逻辑放在Assets 文件夹中以实现将h5代码打包为apk
  • ¥15 使用小程序wx.createWebAudioContext()开发节拍器
  • ¥15 关于#爬虫#的问题:请问HMDB代谢物爬虫的那个工具可以提供一下吗
  • ¥15 vue3+electron打包获取本地视频属性,文件夹里面有ffprobe.exe 文件还会报错这是什么原因呢?
  • ¥20 用51单片机控制急停。
  • ¥15 孟德尔随机化结果不一致
  • ¥15 在使用pyecharts时出现问题
  • ¥15 深度学习残差模块模型
  • ¥50 怎么判断同步时序逻辑电路和异步时序逻辑电路
  • ¥15 差动电流二次谐波的含量Matlab计算