我正在使用 python-social-auth 在 Django 中检索 LinkedIn 个人资料数据。
<a href="{% url 'social:begin' 'linkedin-oauth2' %}?next={{ request.path }}">Login with LinkedIn</a>
是使用 LinkedIn 登录的链接。
SOCIAL_AUTH_LINKEDIN_OAUTH2_EXTRA_DATA = [('id', 'id'), ('firstName', 'first_name'), ('lastName', 'last_name'), ('email-address', 'email_address'), ('positions', 'positions'), ('summary', 'summary'), ('headline', 'headline'), ('picture-url', 'picture_url'),
('site-standard-profile-request', 'site_standard_profile_request'), ('public-profile-url', 'public_profile_url'), ('location', 'location'), ('interests', 'interests'), ('skills', 'skills'), ('languages', 'languages'),]
但是,当我检查额外数据时,它只正确返回名字、姓氏、访问令牌和 ID。其他一切都是空的。
我错过了什么?