使用PHP无需用户登录即可访问LinkedIn API [英] Use PHP to access LinkedIn API without user login

查看:85
本文介绍了使用PHP无需用户登录即可访问LinkedIn API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自动通过API链接从我的公司页面上提取数据.这将是服务器端的工作,而无需用户干预.

I'm trying to automate a data pull from MY company page on linked in via the API. This will be a server side job with no user intervention.

我有登录凭据的凭据,并且REST API应用程序的密钥如下: https://developer.linkedin.com/documents/quick-start-guide

I have credentials to log into linkedin and a REST API Application with keys as per: https://developer.linkedin.com/documents/quick-start-guide

我希望能够每晚提取墙的内容以将其汇总到我的社交媒体网站上.

I want to be able to pull the contents of my wall nightly to aggregate it to my social media site.

是否有一种获取和存储Oauth令牌服务器端而不要求或伪造客户端会话段的方法?

Is there a way to obtain and store the Oauth token server side and not require or fake the client session piece?

谢谢!

推荐答案

可以,但是令牌可以过期,因此需要在需要时进行续签.

Yes you can, but a token can expire so you need renew it when needed.

这里是一个示例: https://github.com /EJTH/SLinkedIn/blob/master/examples/reusing-tokens.php

如果您运行了cron,则不要授权,但要处理异常以重置令牌,并强制用户在下次登录时续签令牌.

If you run a cron then dont authorize, but handle exceptions to reset the token and force the user to renew it on the next login.

这篇关于使用PHP无需用户登录即可访问LinkedIn API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆