I accessed the user via twitter twitter_auth. Here is the code for this.
def twitter client = TwitterOAuth::Client.new( :consumer_key => '******', :consumer_secret => '********' ) request_token = client.request_token(:oauth_callback => new_user_url) session[:request_token] = request_token redirect_to request_token.authorize_url end def new client = TwitterOAuth::Client.new( :consumer_key => '*****', :consumer_secret => '******' ) access_token = client.authorize( session[:request_token].token, session[:request_token].secret, :oauth_verifier => params[:oauth_verifier] )
I am confused when using twitter gem because each example from the docs says:
Twitter.user("sferik").location
From friends and followers
Twitter.accept("sferik")
All these errors make sense, because we apply these methods to the class, and not to the object. But how to create an object for this. I have an authorized user, but how to take measures on his profile using the token that we received.
source share