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 根据以下文字信息,做EA模型图
  • ¥15 删除虚拟显示器驱动 删除所有 Xorg 配置文件 删除显示器缓存文件 重启系统 可是依旧无法退出虚拟显示器
  • ¥15 vscode程序一直报同样的错,如何解决?
  • ¥15 关于使用unity中遇到的问题
  • ¥15 开放世界如何写线性关卡的用例(类似原神)
  • ¥15 关于并联谐振电磁感应加热
  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥60 关机时蓝屏并显示KMODE_EXCEPTION_NOT_HANDLED,怎么修?
  • ¥66 如何制作支付宝扫码跳转到发红包界面