I'm using passport.js to perform Facebook authentication in node.js. Everything works fine except user profile picture. I tried these approaches:
user.facebook.picture = profile.user_photos[0].value;
user.facebook.picture = 'http://ift.tt/wljqS4' + user.facebook.id + '/picture?height=350&width=250';
And also adding access token:
user.facebook.picture = 'http://ift.tt/wljqS4' + user.facebook.id + '/picture?height=350&width=250' + "&access_token=" + user.facebook.token;
However, on clientside facebook picture returns undefined. What might be the possible solution?
Aucun commentaire:
Enregistrer un commentaire