嗨,我正在尝试获取从linkedin登录的用户的个人资料网址(登录部分已被钉死),但根据文档,我需要从api请求虚名。
所以我要求它如下:
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,vanityName,profilePicture(displayImage~:playableStreams))
无济于事,请注意没有访问被拒绝或错误,它返回一些数据,但没有虚名。示例返回带有已删除部分的 json
{
"firstName": ...
},
"lastName": ...
},
"profilePicture":...,
"id":"M-jljLc2ue"
}
我使用以下文档作为引用
https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api?context=linkedin/consumer/context .
如果有任何用处,我将使用 laravel socialite 包作为基础
最佳答案
您无法获得 vanityName
或 public profile URL
在 v2 中,除非您拥有领英批准的许可。如果您申请合作伙伴计划以获得 vanityName
,他们也会劝阻。 .
请检查下面的链接和报价。
https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api?context=linkedin/consumer/context
The use of this API is restricted to those developers approved by LinkedIn and subject to applicable data restrictions in their agreements.
https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api-v1-migration
Please do not apply to a partner program like the Marketing Developer Platform if you are seeking access to member profile data that is not made available via the new “Lite Profile” permission. Access to partner programs is appropriate for select use cases only, and all other requests for access will be rejected.
https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq?context=linkedin/consumer/context
LinkedIn v1 API 权限列表 (旧)
LinkedIn v2 API 权限列表 (新)
关于Linkedin cat 获取虚名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55231156/