Skip to content

Commit

Permalink
explicitely use long for Py2 and int for Py3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nar Kumar committed May 28, 2014
1 parent 709456d commit e58517a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django_facebook/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ def process_request(self, request):
parsed_signed_request = FacebookAuthorization.parse_signed_data(
signed_request)
access_token = parsed_signed_request['oauth_token']
if six.PY3:
long = int
facebook_id = long(parsed_signed_request['user_id'])
if six.PY2:
facebook_id = long(parsed_signed_request['user_id'])
else:
facebook_id = int(parsed_signed_request['user_id'])
except:
# redirect to authorization dialog
# if app not authorized by user
Expand Down

0 comments on commit e58517a

Please sign in to comment.