FACEBOOK_EXTENDED_PERMISSIONS = [...]
+- Define ``FACEBOOK_PROFILE_EXTRA_PARAMS`` to pass extra parameters to
+ https://graph.facebook.com/me when gathering the user profile data, like::
+
+ FACEBOOK_PROFILE_EXTRA_PARAMS = {'locale': 'ru_RU'}
+
If you define a redirect URL in Facebook setup page, be sure to not define
http://127.0.0.1:8000 or http://localhost:8000 because it won't work when
testing. Instead I define http://myapp.com and setup a mapping on /etc/hosts
FACEBOOK_EXTENDED_PERMISSIONS = [...]
+- Define ``FACEBOOK_PROFILE_EXTRA_PARAMS`` to pass extra parameters to
+ https://graph.facebook.com/me when gathering the user profile data, like::
+
+ FACEBOOK_PROFILE_EXTRA_PARAMS = {'locale': 'ru_RU'}
+
If you define a redirect URL in Facebook setup page, be sure to not define
http://127.0.0.1:8000 or http://localhost:8000 because it won't work when
testing. Instead I define http://myapp.com and setup a mapping on /etc/hosts
def user_data(self, access_token):
"""Loads user data from service"""
data = None
- url = FACEBOOK_ME + urlencode({'access_token': access_token})
+ params = setting('FACEBOOK_PROFILE_EXTRA_PARAMS', {})
+ params['access_token'] = access_token
+ url = FACEBOOK_ME + urlencode(params)
try:
data = simplejson.load(urlopen(url))