duanjian9148 2013-02-05 00:34
浏览 575
已采纳

从他们的FB ID获取Facebook用户电子邮件

I have spent hours looking for a solution and have finally given up. I'm hoping someone can help me.

Basically, I have an iPhone App where users can sign in with Facebook. When they do this their Facebook ID is sent to the server and is used as their userID (instead of their email, if they sign in with email). Now, if I want to email new users when they register/sign-in for the first time, how can I get the facebook user's email from the ID sent to the server. I do have email permissions from Facebook, but I have no idea how to get the user's email from their ID alone.

Is this possible?

  • 写回答

2条回答 默认 最新

  • douti6740 2013-02-05 02:31
    关注

    Instead of sending the user_id to your server when they authenticate on your app, send the access_token. You can then query the API with that token and get all of the data they've authorized you to have.

    Bonus: It's almost impossible for someone to spoof a valid access token issued to your app.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘