Ruby on rails 如何在rails中使用omniauth为微博调用API?

Ruby on rails 如何在rails中使用omniauth为微博调用API?,ruby-on-rails,omniauth,weibo,Ruby On Rails,Omniauth,Weibo,我的密码是 consumer = OAuth::Consumer.new(app_key, app_secret, { :site => "http://api.weibo.com", :scheme => :header }) request_token = consumer.get_request_token token_hash = { :oauth_token => request_token.params['oauth_token'], :oauth_tok

我的密码是

 consumer = OAuth::Consumer.new(app_key, app_secret, { :site => "http://api.weibo.com", :scheme => :header })

 request_token = consumer.get_request_token

 token_hash = { :oauth_token => request_token.params['oauth_token'], :oauth_token_secret => request_token.params['oauth_token_secret'] }

 access_token = OAuth::AccessToken.from_hash(consumer, token_hash)

 feeds = access_token.request(:get, '/2/account/get_uid.json?source=app_key')
但是,我得到了以下错误

 {"error":"token_rejected!","error_code":21317,"request":"/2/account/get_uid.json"} 

如何解决此错误?

您好,您找到解决此问题的方法了吗?我正在努力实现类似的目标。