Linkedin二级连接API


Linkedin second degree connections API

我根据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']);
        }

但是当获取二级连接时,得到一个错误消息,如"Access to connections denied"

引自linkedin开发者论坛

API在API返回的内容方面更显式。只有一级连接连接API返回。而r_network成员权限授予应用程序访问一级和二级连接 (此成员权限是连接API和人员搜索API所必需的),只有通过的人员搜索API,它允许您访问二级连接。Connections API一直以来只被限制为一级连接。

这就是你的问题了