passport-facebook-token icon indicating copy to clipboard operation
passport-facebook-token copied to clipboard

expose fields to be returned

Open ianomad opened this issue 8 years ago • 4 comments

expose fields param like in: https://www.npmjs.com/package/passport-facebook

ianomad avatar Feb 12 '17 22:02 ianomad

You can use the option profileFields to include the fields you want.

{
  clientID: '',
  clientSecret: '',
  profileFields: ['id', 'displayName', 'name', 'emails', 'gender'],
}

stubbies avatar Jan 15 '18 11:01 stubbies

I received an empty field for email, although I published my email emails: [ { value: '' } ]

anhkhoi avatar Jan 18 '18 08:01 anhkhoi

Hello, I am having the same issue, emails is empty emails: [{ value: '' }] 🤕

martinnov92 avatar Feb 19 '18 14:02 martinnov92

@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'],
}

attacomsian avatar Jan 23 '19 10:01 attacomsian