テスト用oauth_callback

oauth gem(0.4.0)のoauth_callbackでちょっとはまったのでメモ。

/rubyを参考に、Twitterに登録しているコールバックURLとは別にテスト用のURL(が使いたかったので、いろいろ試してみた結果、次で動いた。

test_callback  = "http://example.org/login"
request_token = consumer.get_request_token(:oauth_callback => test_callback)
aurhorize_url = request_token.authorize_url(:oauth_callback => test_callback)

なんで両方で指定しなければならないのかは謎。


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">