[英]Can I show my LinkedIn profile information using their API?
so, long story short, I'm working on my portfolio and I want to retrieve my LinkedIn recommendations from my profile, I googled but all I could find was about retrieving info from logged-in users using OAuth, is there a way to get a personal API
key to retrieve my profile's info for everyone to see on my portfolio?所以,长话短说,我正在研究我的投资组合,我想从我的个人资料中检索我的 LinkedIn 推荐,我用谷歌搜索,但我能找到的只是使用 OAuth 从登录用户那里检索信息,有没有办法获得个人API
密钥来检索我的个人资料信息,供所有人在我的投资组合中查看?
I don't think this is important but I'm using React.我不认为这很重要,但我正在使用 React。
I hope I made myself clear, I'd appreciate your help!我希望我说清楚了,我会感谢你的帮助!
Well, when you do the 2-legged OAuth flow, you receive a response that includes an access_token that you can use to make api requests.好吧,当您执行 2-legged OAuth 流时,您会收到一个响应,其中包含一个 access_token,您可以使用它来发出 api 请求。 Here is the documentation. 这是文档。
So in your react site, whenever you fail the request (which means your access token expired), you can just resend the request and get the new access token.因此,在您的反应站点中,只要您的请求失败(这意味着您的访问令牌已过期),您就可以重新发送请求并获取新的访问令牌。 This access token acts like an api key, and the 2-legged OAuth flow can be entirely automated without user intervention.此访问令牌的作用类似于 api 密钥,而 2 腿 OAuth 流程可以完全自动化,无需用户干预。 These tokens have a 30 minute lifespan, so maybe you can just set an interval to fire every 30 minutes to refresh the token.这些令牌有 30 分钟的生命周期,所以也许您可以设置一个间隔,每 30 分钟触发一次以刷新令牌。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.