Get request_token and request_secret from Foursquare
I want to get my access_token and access_token_secret from developer.foursquare.com. I read and used
oauth_key = 'my_key'
oauth_secret = 'my_secret'
oauth = Foursquare::OAuth.new(oauth_key, oauth_secret)
request_token = oauth.request_token.token
request_secret = oauth.request_token.secret
also I have tried;
oauth_key = 'my_key'
oauth_secret = 'my_secret'
oauth = Foursquare::OAuth.new(oauth_key, oauth_secret)
oauth.request_token(:oauth_callback => "https://foursquare.com/oauth2/access_token")
request_token = oauth.request_token.token
request_secret = oauth.request_token.secret
but when I run my project I get "OAuth::Unauthorized (404 Not Found):" error. How can I solv开发者_如何学Pythone it? Does anyone have any idea?
精彩评论