无论如何都要使用PHP通过API调用来更新linkedin公司页面的公司状态,
答案 0 :(得分:3)
没有办法创建LinkedIn所指的“分享”#39;对于一家公司而言。 Here is a post on their forums与此有关。
答案 1 :(得分:2)
这是一个非常快速的指南。使用LinkedIn API查看我的决定。在此之前请记住:
满足上述条件后,请转至https://www.linkedin.com/secure/developer并使用您的个人资料凭据登录。添加新应用程序以获取API密钥,密钥,OAuth用户令牌和OAuth用户密钥。
用于发布公司股票的LinkedIn API的PHP代码:
require 'OAuth.php'; // .. or install the PECL extension.. Google it
$apiKey = 'xxxxxxx'; // take it from your application
$apiSecret = 'yyyyyyyyy'; // take it from your application
$accessToken = 'zzzzzzzzz'; // take it from your application
$accessToken = 'kkkkkkkkkkk'; // take it from your application
$oauth = new OAuth($apiKey, $apiSecret);
$oauth->setToken($accessToken, $accessTokenSecret);
$body = new stdClass();
$body->comment = 'Some comment';
$body->content = new stdClass();
$body->content->title = 'Some title';
$body->content->description = 'Some description';
$body->content->{'submitted-url'} = 'http://www.mycompany.com/article_id/123456'; // ID of your company page in LinkedIn
$body->visibility = new stdClass();
$body->visibility->code = 'anyone';
$body_json = json_encode($body);
$oauth->fetch('http://api.linkedin.com/v1/companies/12345678/shares', $body_json, OAUTH_HTTP_METHOD_POST, array(
"Content-Type" => "application/json",
"x-li-format" => "json"
));
$response = json_decode($oauth->getLastResponse());
我希望它有所帮助。
答案 2 :(得分:2)
此问题的已接受答案已不再有效,另一个链接到现在可用的公告的答案有两个断开的链接
为了澄清,您可以现在发布公司状态更新/共享,其文档位于https://developer.linkedin.com/docs/company-pages#company_share
答案 3 :(得分:1)