문제

I am implementing social login in my application and I am already getting normal fields as First Name, Last Name on Facebook and LinkedIn... Now I want to get the profile picture. I did it for LinkedIn and it is working perfectly, i can see the URL on the extra fields from the database.

I am trying to do the same with Facebook, as I saw here https://groups.google.com/forum/?fromgroups#!topic/django-social-auth/Mee8H8HhLQk defining

FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'picture'}
FACEBOOK_EXTRA_DATA = [('profile', 'profile')]

But when i did this, somethings got messed up. I am not able anymore to get the first name and last name in my user table as I was doing before these two lines of code. Does anyone know why this problem is happening?

도움이 되었습니까?

해결책

The picture is under http://graph.facebook.com/<user_id>/picture. The user_id is given by the FacebookBackend.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top