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

Already on GitHub? Sign in to your account

Foursquare expects 'oauth_token' instead of 'access_token' #9

Closed
lrvick opened this Issue Apr 21, 2012 · 3 comments

Comments

Projects
None yet
2 participants

lrvick commented Apr 21, 2012

Using the following fails as Fourquare expects the access_token to be provided as 'oauth_token'

profile = service.request(
    'GET',
    'https://api.foursquare.com/v2/users/self' ,
    access_token=token
).content

Currently I am using the following dirty hack which works:

profile = service.request(
    'GET',
    'https://api.foursquare.com/v2/users/self?oauth_token=%s' % token,
    access_token=token,
).content

Really I think this is more Fourquare's fault for not using the same argument name as everyone else... however a nicer workaround or argument option in rauth would be nice.

Perhaps just add and 'oauth_token' option to request() that does the same thing as 'access_token' and require one of them, but not both?

Contributor

maxcountryman commented Apr 21, 2012

I think what we should do here is pass the access token as a generic parameter of the request.

Contributor

maxcountryman commented Apr 21, 2012

I'm working on changing the way request objects are created and wrapping them in an extended API which will directly mirror Requests without breaking too much in the process. I'll close this issue when that's done. Thanks! 🍰

Contributor

maxcountryman commented Apr 23, 2012

Hi again, I've pushed some updates to the API that I think should address this issue. Be aware that these were breaking changes so you may have to teak things a little bit. However I think it's worth it as the modified API is more generic and should (hopefully) avoid these issues. Thanks for reporting this issue! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment