Skip to content

Conversation

pjg
Copy link
Contributor

@pjg pjg commented Jan 8, 2019

This PR supercedes a couple of other forks (#38, sureswiftcapital@d3c49cd, level29@9abf9da and g2crowd@d206ca3), each of them implementing a different part of the v2 API upgrade. It aims to be complete at what it does, but only when it comes to the r_liteprofile LinkedIn profile option, which will be the only available option to 99% of us after 1st of March, 2019 when LinkedIn will deprecate access to r_basicprofile.

This means that we can only get: id, first-name, last-name, email-address (only a single, primary email address) and picture-url (I opted for the best available picture crop out of the returned array, which is 800x800 at most) and not much else (https://docs.microsoft.com/en-us/linkedin/shared/references/v2/profile/lite-profile).

Deprecation notice information: https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq

j4rs and others added 9 commits January 2, 2019 14:20
* switch to use `r_liteprofile` (reduce number of fields)
* parse `profilePicture` response (use last picture in the array)

Email parsing comes next.
`omniauth-oauth2` depends on `omniauth` so no need to depend on both.
@decioferreira decioferreira merged commit c97a42c into decioferreira:master Jan 9, 2019
@decioferreira
Copy link
Owner

decioferreira commented Jan 9, 2019

Thank you! closes #38

@pjg
Copy link
Contributor Author

pjg commented Jan 9, 2019

Wow, that was quick and quite unexpected. Thank you!

I'd also appreciate an official gem release, if possible.

@decioferreira
Copy link
Owner

did a gem release, can you please confirm it is working correctly? Haven't done this in a very long time.

@pjg
Copy link
Contributor Author

pjg commented Jan 9, 2019

The gem release worked fine. New version is available to everyone. I can confirm it works correctly for my LinkedIn account on my local setup, but I've yet to test it with a broader audience.

@daveslutzkin
Copy link

Thanks @pjg and @decioferreira for making this happen! This seems to be broken for clients which haven't yet been force-upgraded to LinkedIn API v2, and there's no manual option at LinkedIn's end to update them. We've fixed that just by pinning to 0.2.5 of this gem, we'll remove the pin when LinkedIn get around to upgrading us.

@pjg
Copy link
Contributor Author

pjg commented Jan 13, 2019

I've noticed it too. I have two OAuth apps at LinkedIn. One (surprisingly, a very old one) allows me to enable the r_liteprofile setting, while a newly created one does not.

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

Successfully merging this pull request may close these issues.

4 participants