gpt4 book ai didi

Django 社交身份验证、linkedin 额外值

转载 作者:行者123 更新时间:2023-12-02 06:39:40 25 4
gpt4 key购买 nike

我正在尝试使用 django 社交身份验证进行 linkedin 作为我的用户的登录名。我想从用户帐户中获取额外的值。我已经在我的 settings.py 中提到了参数,

LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress','r_fullprofile']

但我得到的响应只是用户的基本个人资料信息。我怎样才能获得所有提到的范围信息?

最佳答案

您的设置中缺少某些内容。要添加范围后,您应该在设置中添加 LINKEDIN_EXTRA_FIELD_SELECTORSLINKEDIN_EXTRA_DATA

示例:

LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress','r_fullprofile']

LINKEDIN_EXTRA_FIELD_SELECTORS = ['email-address','positions', 'headline','summary','picture-url','site-standard-profile-request','public-profile-url','location','interests','skills','languages',]

LINKEDIN_EXTRA_DATA = [('id', 'id'), ('first-name', 'first_name'), ('last-name', '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'),]

LinkedIn Developers Profile Fields API

关于Django 社交身份验证、linkedin 额外值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14950603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com