【发布时间】:2014-08-21 13:41:24
【问题描述】:
祝程序员愉快。
问题:
我只想知道是否可以在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);
}
提前致谢。
【问题讨论】: