I'm using python social auth with django to login via LinkedIn and I try to obtain the public picture URL. However, no matter what I do I keep getting null. I tried every combination possible, from public-picture-url to pictureUrl, every combo of underscores, CamelCase and dash, with or without "public". Nothing works.
here's my (current) settings:
SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = ['picture-url', 'email-address', 'headline', 'industry']
SOCIAL_AUTH_LINKEDIN_EXTRA_DATA = [('id', 'li_id'),
('firstName', 'first_name'),
('lastName', 'last_name'),
('emailAddress', 'email_address'),
('headline', 'headline'),
('picture-url', 'picture_url')]
AUTHENTICATION_BACKENDS = (
'social_auth.backends.contrib.linkedin.LinkedinBackend',
'django.contrib.auth.backends.ModelBackend',
)
PS I've seen this Django/ python-social-auth: LinkedIn extra data returns null on some fields and it didn't help.