How to get the Facebook email of a user for a bot using bot framework?

风流意气都作罢 提交于 2019-11-28 10:21:27

问题


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?

Thanks for your help in advance


回答1:


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 (luckily) doesn't give out users' emails to bots. A normal Facebook app, on the other hand, might get it.

List of available fields: https://developers.facebook.com/docs/messenger-platform/identity/user-profile#fields



来源:https://stackoverflow.com/questions/39673084/how-to-get-the-facebook-email-of-a-user-for-a-bot-using-bot-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!