I am trying to import friend from my LinkedIn profile. So I am using LinkedIn API from this link https://developer.linkedin.com/documents/code-samples.
I am using my API key and secret key here.
I am getting my name back when I am login with my LinkedIn credential. However, when I am trying to import my connection by changing option I am getting error.
Code I am using for import connection:
$user = fetch('GET', '/v1/people/~/connections:(headline,first-name,last-name)');
print_r($user);
Error that I am getting:
[function.file-get-contents]: failed to open stream:
HTTP request failed!
HTTP/1.0 403 Forbidden in /opt/lampp/htdocs/open-inviter/api.php on line 111
Any clue or help.