我根据 codeigniter/linkedin api 方法获得了linkedin 认证用户的个人资料信息和连接详细信息。但我的最终需要是获取我的连接的连接。linkedin 文档说,如果我们拥有“r_network”权限,我们将获得一级和二级连接,但我做不到。请提出获取二级连接的解决方案。以下是我的代码。
$profile_connections = $this->linkedin->profile('~/connections:(id,first-name,last-name,picture-url,industry,location,public-profile-url,positions:(company:(name)))');
$profile_connections = json_decode($profile_connections['linkedin']);
foreach ($profile_connections->values as $connections){
$sub_connections = $this->linkedin->profile("url=".urlencode($connections->publicProfileUrl)."/connections:(id,first-name,last-name,picture-url,industry,location)");
$sub_connections = json_decode($sub_connections['linkedin']);
}
但是在获取 2 度连接时收到一条错误消息,例如“访问连接被拒绝”。