1👍
The photo can be retrieved directly with the user UID and this URL:
http://graph.facebook.com/UID/picture?width=40&height=40
In function:
fb_uid = SocialAccount.objects.filter(user_id=self.user.id, provider='facebook')
if len(fb_uid):
return "http://graph.facebook.com/{}/picture?width=40&height=40".format(fb_uid[0].uid)
👤Leo
0👍
I’m not entire sure, but I think you will get access to the user’s photos when you add “user_photos” to scope list in facebook configuration. Did you try it?
Here is a link to django allauth documentation: http://django-allauth.readthedocs.org/en/latest/providers.html#facebook
- [Answer]-Django – Call model's method on demand to filter and prefetch data from a reversed foreignkey
- [Answer]-Removing an email from a Django User
- [Answer]-How to manage media files on Windows?
- [Answer]-Django insert into list if doesn't contain it
Source:stackexchange.com