使用Ruby Oauth连接腾讯微薄时不能获取request_token ... 4 replies
by Latest from ChinaonRails
at 2011-01-13 11:45:06
original http://chinaonrails.com/topic/view/4774.html
在获取request_token的时候就碰到了问题,下面是代码:
require 'rubygems'
gem 'oauth','0.4.3'
require 'oauth'
API_KEY = "9b43a5afaca04afd8eb573e673fce3f9"
API_KEY_SECRET = "dd6b3cef9a6896e373085a83cd8b74f9"
options = {
:site => "https://open.t.qq.com/",
:request_token_path => "/cgi-bin/request_token",
:access_token_path => "/cgi-bin/access_token",
:authorize_path => "/cgi-bin/authorize",
:scheme => :query_string
}
@consumer=OAuth::Consumer.new(API_KEY, API_KEY_SECRET, options)
@request_token=@consumer.get_request_token
puts @request_token.inspect
同样的方式,连接新浪微薄,豆瓣是没有问题的。
求解,谢谢