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

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

    not enough info for me, but when was twitter gem last updated? twitter changed their oauth 'stuff' in mid may approx. perhaps you have an old one. I'd update your question to show the callback_url, and make sure you have the right token and secret, which it looks like you don't have.

    also, did you put the right callback url in your twitter app page? alot of times that screws you up too.

    if that fails use mbleighs twitter_auth instead. it worked for me and is pretty slick.

提交回复
热议问题