Skip to content
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

Profile picture #3

Open
yuri-karadzhov opened this issue Feb 15, 2013 · 3 comments
Open

Profile picture #3

yuri-karadzhov opened this issue Feb 15, 2013 · 3 comments

Comments

@yuri-karadzhov
Copy link

How can I get linkedin profile picture with passport auth strategy?

According to linkedin API the picture is accessible in basic profile permission

r_basicprofile Required to retrieve name, photo, headline, and current positions for authenticated user

I specified the scope

app.get('/auth/linkedin',
  passport.authenticate('linkedin', { scope: ['r_basicprofile', 'r_emailaddress'] }));

But have no idea what field should I use to get a picture.

passport.use(new LinkedInStrategy({
    // clientID, clientSecret and callbackURL
    profileFields: ['id', 'first-name', 'last-name', 'email-address', 'headline', 'smth_to_get_a_picture']
  },
  // verify callback
));
@yuri-karadzhov
Copy link
Author

I found the field name - picture-url, but it is saved to pictureUrl parameter in profile not picture like in fb or g+

@yuri-karadzhov
Copy link
Author

May be it is good idea to add picture field to standard passport profile fields (now it is supported by many providers).

@emirotin
Copy link

+1 to the request, once 'picture-url' is in GET, the pictureUrl field is available in the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants