passport-facebook-token
passport-facebook-token copied to clipboard
expose fields to be returned
expose fields param like in: https://www.npmjs.com/package/passport-facebook
You can use the option profileFields to include the fields you want.
{
clientID: '',
clientSecret: '',
profileFields: ['id', 'displayName', 'name', 'emails', 'gender'],
}
I received an empty field for email, although I published my email
emails: [ { value: '' } ]
Hello, I am having the same issue, emails is empty emails: [{ value: '' }] 🤕
@martinnov92 I think the issue is with emails attribute. It should be email instead of emails according to Facebook graph API reference.
Passport Facebook also uses email attribute name.
The correct configuration is the following:
{
clientID: '',
clientSecret: '',
profileFields: ['id', 'displayName', 'name', 'email', 'gender'],
}