-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
facebook gender is empty for Sails framework? #66
Comments
It seems to be showing on everyone else's.. is it just a sails thing? |
@rslim087g could be that profile you got just doesn't have gender property. |
I tried three profiles. If I do a facebook graph request on the client side it gives me gender for all of them. |
Could it be a framework or library that I'm not using ? |
only frameworks I'm using are app.use(bodyParser.json()); , and passport.use(facebookLoginStrategy) , do I need some other parser for things like gender?? |
figured it out, had to add this
------> profileFields: ['id', 'displayName', 'gender'] |
console.log of profile gives :
As you can see, gender has no value. Why is that? Below is my token strategy, similar to a lot of them
var facebookLoginStrategy = new FacebookTokenStrategy({
clientID: '1512072982155691',
clientSecret: '7b89b4bdfba3408b68efe9fd1c3a8164'
}, function(accessToken, refreshToken, profile, done) {
User.findOrCreate({ id: profile.id}, function (err, user) {
console.log(profile)
return done(err, user);
});
});
The text was updated successfully, but these errors were encountered: