Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foursquare defaulting to 5-digit code flow #9

Open
donpdonp opened this issue Oct 5, 2010 · 0 comments
Open

Foursquare defaulting to 5-digit code flow #9

donpdonp opened this issue Oct 5, 2010 · 0 comments

Comments

@donpdonp
Copy link

donpdonp commented Oct 5, 2010

I setup foursquare as specified in the readme. When I approved foursquare access, foursquare gave a 5 digit code instead of redirecting back to the webapp. Turns out the foursquare behavior has changed an the oauth_callback must be specified when the request token is acquired.

instead of (from README)

oauth = Foursquare::OAuth.new(oauth_key, oauth_secret)
request_token = oauth.request_token.token
request_secret = oauth.request_token.secret

do:

oauth = Foursquare::OAuth.new(oauth_key, oauth_secret)
oauth.request_token(:oauth_callback => "callback url")
request_token = oauth.request_token.token
request_secret = oauth.request_token.secret

This will get foursquare to redirect back to the webapp. request_token() does an HTTP request to foursquare, and subsequent calls appear to cache the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant