Skip to content

Commit

Permalink
Merge pull request #176 from michisu/master
Browse files Browse the repository at this point in the history
Add version parameter to foursquare backend
  • Loading branch information
omab committed Feb 3, 2014
2 parents 9a0b375 + d5efa6d commit 4213577
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion social/backends/foursquare.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class FoursquareOAuth2(BaseOAuth2):
AUTHORIZATION_URL = 'https://foursquare.com/oauth2/authenticate'
ACCESS_TOKEN_URL = 'https://foursquare.com/oauth2/access_token'
ACCESS_TOKEN_METHOD = 'POST'
API_VERSION = '20140128'

def get_user_id(self, details, response):
return response['response']['user']['id']
Expand All @@ -27,4 +28,5 @@ def get_user_details(self, response):
def user_data(self, access_token, *args, **kwargs):
"""Loads user data from service"""
return self.get_json('https://api.foursquare.com/v2/users/self',
params={'oauth_token': access_token})
params={'oauth_token': access_token,
'v': self.API_VERSION})

0 comments on commit 4213577

Please sign in to comment.