Open ghost opened 7 years ago
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
clientID: '1512072982155691',
clientSecret: '7b89b4bdfba3408b68efe9fd1c3a8164',
------> profileFields: ['id', 'displayName', 'gender']
relates to #68 @ghaiklor seems to be an outdated doc issue
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);
});
});