I''m building something like a multi-twitter-feed-manager, using the TwitterOauth plugin to handle authorization with Twitter. Before redirecting to Twitter, I add some data to the session. When Twitter redirects to the callback, the session is empty. Can anyone explain this? Here''s the controller. class TwitterAuthorizationsController < ApplicationController def new @authorization = TwitterAuthorization.new @authorization.request @authorization.prepare_session session #this correctly prints out the session puts "TwitterAuthorizationsController#new session # {session.to_json}" redirect_to @authorization.url end def callback #and here it''s empty puts "TwitterAuthorizationsController#callback session # {session.to_json}" @authorization = TwitterAuthorization.new @authorization.authorize session @authorization.save end end And here''s the model: class TwitterAuthorization < ActiveRecord::Base has_many :twitter_authentications def initialize @client = TwitterOAuth::Client.new(:consumer_key => ''**********************'',:consumer_secret => ''******************'') end def request @request_token = @client.request_token(:oauth_callback => ''http:// 0.0.0.0:3000/oauth_callback'') end def authorize session puts "DEBUG session #{session.to_json}" @access_token = @client.authorize( session[:request_token], session[:request_token_secret], :oauth_verifier => params [:oauth_verifier]) if @client.authorized? access_token = @access_token.token secret_token = @access_token.secret end end def prepare_session session session[:request_token] = @request_token.token session[:request_token_secret] = @request_token.secret end def url @request_token.authorize_url end end Thanks! -Andrew -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.