简体   繁体   English

LinkedIn登录API在步骤3中提供了禁止访问403

[英]LinkedIn login API gives Access Forbidden 403 in step 3

So I have been following the tutorial to set up a LinkedIn login for my website. 因此,我一直在按照教程为我的网站设置LinkedIn登录。

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. 现在,我必须发送HTTP POST并获取JSON响应才能完成我的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! 警告:file_get_contents( http://www.linkedin.com ):无法打开流:HTTP请求失败! HTTP/1.0 403 Forbidden in D:\\xampp\\htdocs\\LinkedIn\\index.php on line 22 bool(false) 第22行的D:\\ xampp \\ htdocs \\ LinkedIn \\ index.php中禁止HTTP / 1.0 403 bool(false)

Can Anyone tell me what am I possibly doing wrong or alternative workaround? 有人可以告诉我我可能做错了什么或其他解决方法吗?

2 Years back i worked on linkedin login but it didn't work for me too. 2年前,我从事过Linkedin登录工作,但对我也不起作用。 I suggest instead using OAuth login try with javascript SDK. 我建议改为使用OAuth登录并尝试使用javascript SDK。 linkedin login SDK linkedin登录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. http到https也是禁止访问的原因,因为OAuth会命中服务器到服务器的请求,该请求基本上是http到https。

Hope this will help. 希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM