django - python social auth linkedin picture url is null -
i'm using python social auth django login via linkedin , try obtain public picture url. however, no matter keep getting null. tried every combination possible, public-picture-url pictureurl, every combo of underscores, camelcase , dash, or without "public". nothing works.
here's (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 django/ python-social-auth: linkedin data returns null on fields , didn't help.
apparently collecting data not in pipeline default. solved it:
social_auth_pipeline = ( 'social.pipeline.social_auth.social_details', 'social.pipeline.social_auth.social_uid', 'social.pipeline.social_auth.auth_allowed', 'social.pipeline.social_auth.social_user', 'social.pipeline.user.get_username', 'social.pipeline.user.create_user', 'social.pipeline.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details' )
Comments
Post a Comment