Skip to content

Commit

Permalink
Updated to the latest Twitter gem release, set the callback url and a…
Browse files Browse the repository at this point in the history
…dded the oauth verifier. OAuth is now back in business.
  • Loading branch information
jnunemaker committed Aug 23, 2009
1 parent 91d359d commit 13927c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/controllers/authorizations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
class AuthorizationsController < ApplicationController
def new
oauth = current_user.oauth
oauth.set_callback_url(authorization_url)
session['rtoken'] = oauth.request_token.token
session['rsecret'] = oauth.request_token.secret
redirect_to oauth.request_token.authorize_url
end

def show
oauth = current_user.oauth
oauth.authorize_from_request(session['rtoken'], session['rsecret'])
oauth.authorize_from_request(session['rtoken'], session['rsecret'], params[:oauth_verifier])

session['rtoken'] = nil
session['rsecret'] = nil
Expand Down
4 changes: 1 addition & 3 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
:source => 'http://gems.github.com',
:version => '2.3.8'

config.gem 'twitter',
:lib => 'twitter',
:version => '0.6.6'
config.gem 'twitter', :version => '0.6.15'

config.time_zone = 'UTC'
end
Expand Down

0 comments on commit 13927c3

Please sign in to comment.