Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OmniAuth to extract full profile data from LinkedIn

I'm loving the ease of OmniAuth, but I'm having a hard time connecting the dots on making additional api calls after I receive the token back.

I'll use LinkedIn as an example, but it's not LinkedIn that's the issue, more so my lack of understanding on how to make subsequent calls after I have authenticated.

I can make the request to LinkedIn and authenticate just fine. Then I get the hash back and it's completely populated.

Now I would like to call LinkedIn back and get my complete profile data or maybe a list of contacts. How do I do this? Will I need the oauth gem after all?

I'd prefer to avoid app specific gems because I will have to make the same requests to twitter and facebook.

like image 217
John Agan Avatar asked Oct 25 '22 03:10

John Agan


2 Answers

Omniauth is designed for authentification only.

like image 70
Marcel Falliere Avatar answered Nov 15 '22 05:11

Marcel Falliere


Marcel Falliere is right. Omniauth is just for authentication.

You can have a look at this plugin, it could solve your problem.

https://github.com/pengwynn/linkedin

like image 38
Arkan Avatar answered Nov 15 '22 05:11

Arkan