Closed tanvirraj closed 7 years ago
Your settings are for linkedin
backend, but your code is expecting linkedin-oauth2
, your settings should be named like SOCIAL_AUTH_LINKEDIN_OAUTH2_*
.
Please format properly the snippets when submitting a ticket.
Trying so much hard to get linkedin extra data , when a user try to Sign up but cant' get email or full profile list
here is my setting.py
` SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_fullprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = [ 'email-address', 'headline', 'industry']
SOCIAL_AUTH_LINKEDIN_EXTRA_DATA = [('id', 'id'), ('firstName', 'first_name'), ('lastName', 'last_name'), ('emailAddress', 'email_address'), ('headline', 'headline'), ('industry', 'industry')] `
and here is my view.py ` def save_profile(backend, user, response, request, _args, *_kwargs): if backend.name == 'facebook' or backend.name == 'linkedin-oauth2': try: user_profile = UserProfile.objects.get(user=user.id) print "printing try profiel...." print user_profile except: if backend.name == 'facebook': user_id = User.objects.get(pk=user.id) Candidate.assign_role_to_user(user_id) candidate = EmployeeResume(first_name=user.first_name, last_name=user.last_name, email=user.email, created_by=user ) candidate.save()
` User can sign UP but can't get his email adddress