Twitter does not open emails in order to receive the Facebook email that you need to determine FACEBOOK_EXTENDED_PERMISSIONS = ['email'] , LinkedIn email will be automatically downloaded. Emails are stored in the user model under the email attribute.
The profile image can be saved by setting the following parameters:
TWITTER_EXTRA_DATA = [('profile_image_url', 'profile_picture')] LINKEDIN_EXTRA_DATA = [('picture-url', 'profile_picture')]
The Facebook profile picture is available to the API and is not sent during the authorization process. You can define your pipeline to store it as follows:
from django.utils import simplejson from social_auth.utils import dsa_urlopen def facebook_profile_picture(backend, user, social_user, details, response, *args, **kwargs): if backend.name != 'facebook': return url = 'https://graph.facebook.com/{0}/picture?redirect=false&access_token={1}' response = dsa_urlopen(url.format(social_user.extra_data['id'], social_user.extra_data['access_token']) data = simplejson.load(response) social_user.extra_data['profile_picture'] = data['data']['url'] social_user.save()
Add it to the bottom of the pipeline settings (check the documentation for the pipeline http://django-social-auth.readthedocs.org/en/latest/pipeline.html ). This code has not been tested, so play around with it a bit.
Then you can access the profile picture:
social = user.social_auth.get(provider='facebook') # or twitter or linkedin social.extra_data['profile_picture']
source share