Search code examples
ruby-on-railsrubylinkedin-apiomniauth

Omniauth with Linkedin in Rails to Post Updates


I have an application using OmniAuth for authenticating with a variety of social networking services (including Linkedin) and want to post updates. I have the following information on a user from omniauth:

linkedin_verifier: ****
linkedin_token: *****
linkedin_secret: *****
linkedin_url: http://www.linkedin.com/pub/*****

But can't figure out how to use it to post. I've taken a look at: https://github.com/pengwynn/linkedin, but it requires a request token and request secret (I seem to only have the response token and response secret) that I don't get from omniauth. Any ideas?


Solution

  • Have you tried authorize_from_access using the token and secret you get after omniauth?

    client = LinkedIn::Client.new('your_consumer_key', 'your_consumer_secret') client.authorize_from_access(linkedin_token, linkedin_secret)