0

So I have been following the tutorial to set up a LinkedIn login for my website.

I am able to do first two steps with ease and I get the authorization code.

Now I have to send HTTP POST and get JSON response to complete my LinkedIn API. I used following method to do same but I am getting an error.

Warning: file_get_contents(http://www.linkedin.com): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in D:\xampp\htdocs\LinkedIn\index.php on line 22 bool(false)

Can Anyone tell me what am I possibly doing wrong or alternative workaround?

Purvik Dhorajiya
  • 4,662
  • 3
  • 34
  • 43
Maggi Iggam
  • 682
  • 1
  • 8
  • 20

1 Answers1

0

2 Years back i worked on linkedin login but it didn't work for me too. I suggest instead using OAuth login try with javascript SDK. linkedin login SDK

http to https could also the reason for access forbidden because OAuth hits a server to server request which is basically http to https.

Hope this will help.