Marko Anastasov wrote this on August 17, 2011
How to use linkedin gem with Omniauth
Say you want to use the linkedin gem as an interface to the LinkedIn API, but you can’t do what it says in the README, because you want your user to authenticate with Omniauth’s LinkedIn strategy. The solution is to save your user’s access token and secret that you receive in the OAuth callback action, and use them to access the API.
Assuming that a LinkedinConnection model belongs to User, in your controller you might write:
Now whenever you need to make a call to the API, you first need to make a new LinkedIn::Client
object using the saved token and secret: