我想用 PHP 从 LinkedIn 获取公司帖子。我应该使用什么请求来请求该职位?
我尝试使用 PHP 库“zoonman/linkedin-api-php-client”。我已经创建了 LinkedIn 应用程序,并已验证对公司的访问权限。我编写了获取 LinkenIn 访问令牌的代码。我尝试使用GET 'companies' 请求,但收到错误 404 或 410。
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// add Composer autoloader
include_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
// import client class
use LinkedIn\Client;
use LinkedIn\Scope;
use LinkedIn\AccessToken;
// instantiate the Linkedin client
$client = new Client(
'correct client id',
'correct client secret'
);
$scopes = [
Scope::READ_BASIC_PROFILE
];
$client->setRedirectUrl("correct return address, which is the same as URL of current script"); …Run Code Online (Sandbox Code Playgroud)