PirateApp
PirateApp

Reputation: 6220

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

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

Upvotes: 2

Views: 921

Answers (1)

user6269864
user6269864

Reputation:

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

Upvotes: 3

Related Questions