如何使用Bot框架获取机器人的用户的Facebook电子邮件? [英] How to get the Facebook email of a user for a bot using bot framework?

查看:165
本文介绍了如何使用Bot框架获取机器人的用户的Facebook电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Microsoft Bot Framework的帮助下构建的机器人.我可以看到session.message.user.id为我们提供了用户ID,session.message.user.name为我们提供了用户名,但是如果我要与Facebook连接,该如何获取用户的电子邮件?

I have a bot that I am building with the help of the Microsoft Bot Framework. I can see that session.message.user.id gives us the user id and session.message.user.name gives us the user name but if I am to connect it with Facebook, how do I get the user's email?

非常感谢您的帮助

推荐答案

唯一的方法是专门向用户询问其电子邮件,然后例如将其保存在bot中的用户数据中.

The only way is to specifically ask the user for their email and then for example save it in user data in the bot.

幸运的是,Facebook不会将用户的电子邮件发送给机器人.另一方面,普通的Facebook应用程序可能会得到它.

Facebook (luckily) doesn't give out users' emails to bots. A normal Facebook app, on the other hand, might get it.

可用字段列表: https://developers. facebook.com/docs/messenger-platform/identity/user-profile#fields

这篇关于如何使用Bot框架获取机器人的用户的Facebook电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆