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

时间:2014-07-01 05:01:45

标签: php oauth-2.0 linkedin

有一个美好的一天程序员。

问题:

我只想知道是否可以在linkedIn oauth2中搜索人物(通过名字,姓氏)。我使用这个(/ v1 / people /〜:( firstName,lastName)代码来查找我自己的个人资料名字和工作正常,从here获得。但如果我尝试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);
}

提前致谢。

1 个答案:

答案 0 :(得分:1)

解决方案经过长时间的搜索后,我发现人们搜索/公司搜索只能通过审核API。我在LinkedIN forum 中提出了同样的问题并得到了答案。

更多信息: Click here to apply vetted API