Linkedin second degree connections API

青春壹個敷衍的年華 提交于 2019-12-05 02:54:29

问题


I got the linkedin authenticated user's profile information and connection details as per the codeigniter/linkedin api method.But my final need is to get the connections of my connections.The linkedin documentation says that if we have the 'r_network' permission we will get the 1st and 2nd degree connections,but I couldn't. Please suggest a solution for fetching the second degree connections.The following is my code.

$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']);
        }

But while fetching the 2nd degree connection got an error message like "Access to connections denied".


回答1:


Quoted from linkedin developer forum:

API to be more explicit in terms of what is returned by the API. Only 1st degree connections are returned by the Connections API. While the r_network member permissions does grant your application access to both 1st and 2nd degree connections (this member permissions is required for both Connections API and People Search API), it's only through the People Search API which allows you access to 2nd degree connections. The Connections API has always only been restricted to 1st degree connections.

So, that's pretty much your problem.



来源:https://stackoverflow.com/questions/14230502/linkedin-second-degree-connections-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!