如何在linkedIn oauth2中搜索人和公司


How to make people and company search in linkedIn oauth2

祝程序员们一天愉快。

问题:

我只是想知道是否可以在linkedIn oauth2中搜索人(通过名字,姓氏)。我使用这个(/v1/people/~:(firstName,lastName)代码来找到我自己的个人资料名称,它工作得很好,从这里得到了它。但是如果我尝试make people/company search,它会显示错误。我谷歌了一下,但没有找到任何相关的答案。还有一个问题,如何在oauth2中进行这个搜索查询,任何示例代码或参考或文档都非常有用。

我的代码

$user2 = fetch('GET', '/v1/people-search::(~,id,first-name=kamesh,last-name=waran):(id,first-name,last-name,educations)');

function fetch(){
$params = array('oauth2_access_token' => $_SESSION['access_token'],
'format' => 'json'
);
$url = 'https://api.linkedin.com' . $resource . '?' . http_build_query($params);
$context = stream_context_create(
array('http' =>
array('method' => $method,
)
)
);
$response = file_get_contents($url, false, $context);
return json_decode($response);
}

解决方案:经过长时间的搜索,我发现人员搜索/公司搜索只能使用经过审查的API。我在领英论坛上传了同样的问题,并得到了答案。

更多信息:点击这里应用经过审查的API