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

前端 未结 8 1361
抹茶落季
抹茶落季 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:36

    Twitter doesn't allow localhost as part of a valid callback URL.

    Instead use http://127.0.0.1:3000/auth/twitter/callback

    Hope this helps

提交回复
热议问题