philnash / bitly

🗜 A Ruby wrapper for the bit.ly API
https://rubygems.org/gems/bitly
MIT License
451 stars 139 forks source link

authentication using oauth code #17

Closed sashazykov closed 12 years ago

sashazykov commented 12 years ago

How can I make api requests using code received from bitly oauth api?

Also, I tried to use oauth class form bitly gem, but I have got an error:

undefined method `web_server' for #<OAuth2::Client:0x10f6ad280>
@bitly = Bitly::V3::OAuth.new client_id, client_secret
@bitly.authorize_url(some_url)
sashazykov commented 12 years ago

I have realized that I should use /oauth/access_token request, but now I can't do it using bitly gem.

philnash commented 12 years ago

Hi,

I'm not sure what's going on here. I will look into it when I can.

philnash commented 12 years ago

There was a change in the OAuth2 gem between version 0.4.x and 0.5.x which caused this issue. This has been sorted in version 0.7.0 of bitly.

Sorry it took so long to sort this.