简体   繁体   English

如何使用访问令牌在linkedin中获取用户个人资料

[英]How to get user profile in linkedin using access token

I have used LinkedIn API to make registration call in my website, so when user get registered by linked in i am storing their all detail including LinkedIn Id, LinkedIn URL, and access token 我已经使用LinkedIn API在我的网站中进行注册调用,因此当用户通过链接进行注册时,我会存储其所有详细信息,包括LinkedIn ID,LinkedIn URL和访问令牌

Now I want to fetch their Linked latest detail again by cron but as you know i can't redirect to login page of linked in again. 现在,我想通过cron再次获取其Linked最新详细信息,但是如您所知,我无法再次重定向到Linked in的登录页面。

But as i have access token and linked Id so how can I fetch the user detail on behalf of access token or user Id without let to the login page of linked in 但是,由于我具有访问令牌和链接ID,因此如何代表访问令牌或用户ID提取用户详细信息,而不用进入链接到的登录页面

I am stuck at this point from last two days, all you precious help is welcome 从最近两天开始,我就此停滞不前,欢迎您提供宝贵的帮助

Once you have an access token for a user, you can make any API calls on their behalf by following the process outlined here: 获得用户访问令牌后,您可以按照此处概述的过程代表他们进行任何API调用:

https://developer.linkedin.com/docs/oauth2#requests https://developer.linkedin.com/docs/oauth2#requests

Note that access tokens expire after 60 days, unless you refresh them. 请注意,访问令牌将在60天后过期,除非您刷新它们。 Details on refreshing the tokens are here: 刷新令牌的详细信息在这里:

https://developer.linkedin.com/docs/oauth2#refresh https://developer.linkedin.com/docs/oauth2#refresh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM