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

something to do with the verifier? #5

Open
markmcdonald51 opened this issue Jul 23, 2010 · 0 comments
Open

something to do with the verifier? #5

markmcdonald51 opened this issue Jul 23, 2010 · 0 comments

Comments

@markmcdonald51
Copy link

this is probably a stupid question...but...

I am trying to access foursquare using your gem as such

require 'rubygems'
require 'foursquare'

oauth_key = 'some_real_key'
oauth_secret = 'some_real_secret'

oauth = Foursquare::OAuth.new(oauth_key, oauth_secret)

request_token = oauth.request_token.token
request_secret = oauth.request_token.secret

redirecting user to foursquare to authorize

oauth.request_token.authorize_url

foursquare redirects back to your callback url, passing the verifier in the url params

verifier = 'test app'

access_token, access_secret = oauth.authorize_from_request(request_token, request_secret, verifier)

When I run this as a script or past it into a rails console I get:

/usr/lib/ruby/gems/1.8/gems/oauth-0.4.0/lib/oauth/consumer.rb:215:in token_request': 401 Unauthorized (OAuth::Unauthorized) from /usr/lib/ruby/gems/1.8/gems/oauth-0.4.0/lib/oauth/tokens/request_token.rb:18:inget_access_token'
from /usr/lib/ruby/gems/1.8/gems/foursquare-0.3.1/lib/foursquare.rb:40:in `authorize_from_request'
from 4square.rb:19

I am thinking this is something to do with the verifier?

Not sure what that is....

Thanks in advance!
Mark

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