LinkedIn API在网络上发布(S_412_PRECONDITION_FAILED =无效参数)

时间:2016-11-20 11:33:45

标签: linkedin laravel-5.3 linkedin-api

当我尝试通过LinkedIn API在我自己的LinkedIn个人资料上发布链接时,我收到此错误:

LinkedIn return error

Request Error: Invalid arguments: {S_412_PRECONDITION_FAILED=Invalid arguments}

我的要求:

$li = new LinkedIn([
    'api_key' => env('LINKEDIN_KEY'),
    'api_secret' => env('LINKEDIN_SECRET'),
    'callback_url' => env('LINKEDIN_REDIRECT_URI')
]);

$li->setAccessToken('my_token');

return $li->post('/people/~/shares', [
    'content' => [
        'title' => 'This is an example of title',
        'description' => 'This is a text with less 256 caracters.',
        'submitted-url' => 'https://www.google.fr/',
    ],
    'comment' => 'This is comment with less 700 caracters.',
    'visibility' => [
        'code' => 'anyone'
    ]
]);

我使用LinkedIn的官方API(linkedinapi / linkedin)。

0 个答案:

没有答案