Python-social-auth Facebook And LinkedIn User's Email Is Empty
I am developing a Django web app using python-social-auth. I have this in my Django settings: SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'xxx' SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'xxx' SOCIAL
Solution 1:
Add this to your settings:
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id,name,email',}
SOCIAL_AUTH_FIELD_SELECTORS = ['email-address',]
Now Facebook and LinkedIn will send user's email and python-social-auth will automatically set them to User model in the database.
Hope this helps someone.
Post a Comment for "Python-social-auth Facebook And LinkedIn User's Email Is Empty"