title: undefined method `get_access_token'
body: <p>My twitter controller code is this</p>
  
  <pre><code>class TwitterController &lt; ApplicationController
    before_filter :authenticate_user!
  
    def index
       unless TwitterOauthSetting.find_by_user_id(current_user.id).nil?
        redirect_to "/twitter_profile"
      end
    end
  
    def generate_twitter_oauth_url
      oauth_callback = "http://#{request.host}:#{request.port}/oauth_account"
  
      @consumer = OAuth::Consumer.new("n3yfOi9iEHwnyz5uEsyNotW6t","kqHFm5dRRX00dIQSwBcTEJKZNAzrWcuK0BOAyDVWY8liRI1cPc", :site =&gt; "https://api.twitter.com")
  
      @request_token = @consumer.get_request_token(:oauth_callback =&gt; oauth_callback)
      session[:request_token] = @request_token
  
      redirect_to @request_token.authorize_url(:oauth_callback =&gt; oauth_callback)
    end
  
  
    def oauth_account
      if TwitterOauthSetting.find_by_user_id(current_user.id).nil?
        @request_token = session[:request_token]
        @access_token = @request_token.get_access_token(:oauth_verifier =&gt; params["oauth_verifier"])
        TwitterOauthSetting.create(atoken: @access_token.token, asecret: @access_token.secret, user_id: current_user.id)
        update_user_account()
      end
      redirect_to "/twitter_profile"
    end
  
    def twitter_profile
      @user_timeline = get_client.user_timeline
      @home_timeline = get_client.home_timeline
    end
  
  private
  
    def get_client    
      Twitter.configure do |config|
        config.consumer_key        = "n3yfOi9iEHwnyz5uEsyNotW6t"
        config.consumer_secret     = "kqHFm5dRRX00dIQSwBcTEJKZNAzrWcuK0BOAyDVWY8liRI1cPc"
      end
  
      Twitter::Client.new(
        :oauth_token =&gt; TwitterOauthSetting.find_by_user_id(current_user.id).atoken,
        :oauth_token_secret =&gt; TwitterOauthSetting.find_by_user_id(current_user.id).asecret
      )
    end
  
    def update_user_account
      user_twitter_profile = get_client.user
      current_user.update_attributes({
        name: user_twitter_profile.name, 
        screen_name: user_twitter_profile.screen_name, 
        url: user_twitter_profile.url, 
        profile_image_url: user_twitter_profile.profile_image_url, 
        location: user_twitter_profile.location, 
        description: user_twitter_profile.description
      })
    end
  
  end
  </code></pre>
  
  <p>On index page add your twitter account option is there. After clicking on that it will authorize app &amp; After authorizaion process i am facing an error "undefined method `get_access_token' .i am facing error in this line " @access_token = @request_token.get_access_token(:oauth_verifier => params["oauth_verifier"])"</p>