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

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

    This problem seems to be caused by twitter not being able to handle connection keep-alive correctly. Make sure you set connection=close http header in the request to twitter. Wasted a weekend debugging this.

提交回复
热议问题