开发者

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 respo开发者_开发百科nse token and response secret) that I don't get from omniauth. Any ideas?


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)


from the link (https://github.com/pengwynn/linkedin) I found this,

You need to get your api keys first, create a client with them and then you will get your request token and response.


#get your api keys at https://www.linkedin.com/secure/developer

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

rtoken = client.request_token.token

rsecret = client.request_token.secret

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜