在我的控制器中,我有以下操作
def twitter
client = TwitterOAuth::Client.new(
:consumer_key => ENV['TWITTER_KEY'],
:consumer_secret => ENV['TWITTER_SECRET']
)
request_token = client.request_token(oauth_callback: "http://myawesomeapp.herokuapp.com/create_users/get_twitter_info")
redirect_to "https://www.twitter.com/oauth/authenticate?oauth_token=#{request_token.params[:oauth_token]}"
end
def get_twitter_info
redirect_to "https://www.twitter.com/oauth/access_token?oauth_verifier=#{params[:oauth_verifier]}&oauth_token=#{params[:oauth_token]}"
end
def results
end
在我的 Twitter 应用程序设置中,我已将 Access 设置为Read Only
并选中Allow this application to be used to Sign in with Twitter
. 为什么会回来
Invalid Request Token
当它到达https://twitter.com/oauth/access_token
页面时?