我正在尝试在我的网站上显示我的linkedin公司页面更新,如此处所示。
https://developer.linkedin.com/reading-company-shares
我从这里下载了源代码 http://thinkdiff.net/linkedin/integrate-linkedin-api-in-your-site/
并在linkedin.php中添加了以下方法
function company($parameters)
{
//$search_url = $this->base_url."/v1/companies/{$parameters}/updates";
//$search_url = $this->base_url . "/v1/people-search?keywords=facebook";
$search_url = "https://api.linkedin.com/v1/companies/918677/updates?";
echo "Performing search for: " . $parameters . "<br />";
echo "Search URL: $search_url <br />";
$request = OAuthRequest::from_consumer_and_token($this->consumer, $this->access_token, "GET", $search_url);
$request->sign_request($this->signature_method, $this->consumer, $this->access_token);
$auth_header = $request->to_header("https://api.linkedin.com");
print_r($auth_header);
$response = $this->httpRequest($search_url, $auth_header, "GET");
return $response;
}
我无法使它工作。我也试图在用户无需登录的情况下显示它们。可能吗 ?任何相同的代码或教程都会有所帮助。
谢谢..