hexgnu / linkedin

Ruby wrapper for the LinkedIn API
http://rdoc.info/gems/linkedin
MIT License
759 stars 407 forks source link

Setting the linkedin pin at the run time #262

Closed mostofamonsur closed 8 years ago

mostofamonsur commented 8 years ago

This is a pretty handy gem.How ever i have some question about the pin from linked in. as the example said that

# to test from your desktop, open the following url in your browser

and record the pin it gives you

request_token.authorize_url => "https://api.linkedin.com/uas/oauth/authorize?oauth_token="

I am getting the pin but the problem is how can i set this pin to the authorize_from_request method at the run time.

then fetch your access keys

client.authorize_from_request(rtoken, rsecret, pin)

can you please suggest me a work around to get rid of that situation. I am sorry it might not be an issue but i didn't get any help. Thanks so much for your help.

hexgnu commented 8 years ago

Once you do all of the initial setup you should be using client.authorize_from_access(token, secret)

https://github.com/hexgnu/linkedin/blob/f59a8a3980a7da512e27962d9587af2b7a5229e9/lib/linked_in/helpers/authorization.rb#L37

you can find that out after you've set up the initial app with client.access_token.token and client.access_token.secret I believe