调用 LinkedIn API 的访问被拒绝

Access denied to call LinkedIn's API

我按照步骤获得了访问令牌 (LinkedIn developer)。但是,当我调用 API 搜索人员时出现错误。

这是我的代码;

Route::post('research', function()

<pre>{ $c = curl_init(); $firstName = Request::input('firstName'); $lastName = Request::input('lastName'); $resource = '&first-name='.$firstName.'&last-name='.$lastName.'&sort=connections'; $参数=数组( 'oauth2_access_token' => Session::get('access_token'), 'format' => 'json', ); $postdata = http_build_query($params); $url = '<a href="https://api.linkedin.com/v1/people-search" rel="nofollow">https://api.linkedin.com/v1/people-search</a>?'.$postdata.$resource; curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 真); curl_setopt($c, CURLOPT_HEADER, 真); $output = curl_exec($c); 如果($输出===假) { trigger_error('Erreur curl : '.curl_error($c),E_USER_WARNING); 退出('error'); }别的{ var_dump($输出); 退出('result'); } curl_close($c); });</pre>

这是我的错误;

<pre>{ "errorCode": 0, "message": "Access to people search denied.", "requestId": "DHYNQTZDN8", "status": 403, "timestamp": 1426519095912 }</pre>

有人可以建议我找到解决方案吗?

提前谢谢你,大卫·默里斯

您需要 LinkedIn 的特别许可才能使用人员搜索 API。 https://developer-programs.linkedin.com/documents/people-search-api