Keep getting OAuth::Unauthorized error when using oauth and twitter ruby gems

前端 未结 8 1357
抹茶落季
抹茶落季 2020-12-12 16:47

I am using the ruby twitter gem and oauth to gain access to users twitter accounts. In my code, I have:

unless @user.twitter_authd?
      oauth = Twitter::O         


        
8条回答
  •  一个人的身影
    2020-12-12 17:32

    If you're getting error 401 - OAuth::Unauthorized, make sure you edit the settings of your Twitter application as follows:

    • Application Type: Browser
    • Callback URL: http://127.0.0.1:3000/auth/twitter/callback

提交回复
热议问题