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".