简体   繁体   English

使用PHP无需用户登录即可访问LinkedIn API

[英]Use PHP to access LinkedIn API without user login

I'm trying to automate a data pull from MY company page on linked in via the API. 我正在尝试自动通过API链接从我的公司页面上提取数据。 This will be a server side job with no user intervention. 这将是服务器端的工作,而无需用户干预。

I have credentials to log into linkedin and a REST API Application with keys as per: https://developer.linkedin.com/documents/quick-start-guide 我具有登录到linkedin和具有以下各项的密钥的REST API应用程序的凭据: 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. 我希望能够每晚提取墙的内容以将其汇总到我的社交媒体网站上。

Is there a way to obtain and store the Oauth token server side and not require or fake the client session piece? 有没有一种方法可以获取和存储Oauth令牌服务器端,而不需要或伪造客户端会话块?

Thanks! 谢谢!

Yes you can, but a token can expire so you need renew it when needed. 是的,您可以,但是令牌可以过期,因此您需要在需要时对其进行续订。

Here is an example: https://github.com/EJTH/SLinkedIn/blob/master/examples/reusing-tokens.php 这是一个例子: https : //github.com/EJTH/SLinkedIn/blob/master/examples/reusing-tokens.php

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. 如果您运行cron,则不要授权,但要处理异常以重置令牌,并强制用户在下次登录时续签令牌。

I don't believe there is because LinkedIn doesn't allow it. 我不相信这是因为LinkedIn不允许这样做。

I've run into the same problem and it seems there may be a way to keep it open longer, but it looks like LinkedIn explicitly bans automated actions in their terms of service. 我遇到了同样的问题,似乎有一种方法可以使它保持更长的打开时间,但看起来LinkedIn已明确禁止其服务范围内的自动操作。 Simply put, I don't believe any automated action can be initiated except by a member. 简而言之,除了成员之外,我不认为可以执行任何自动操作。

This gets into more detail on their stance on automated requests: 这将更详细地说明他们对自动请求的立场:

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

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