Php 在live server中实现linkedin登录
我已经在我的网站上实现了linkedin登录。用户通过我的网站表单输入用户名和密码,成功登录后,我检索用户信息并将其显示在我的网页中。这在本地主机wampserver中运行良好 但是,当我将其部署到live server时,它无法正常工作。 当我输入linkedin的电子邮件地址和密码时。我被重定向到linkedin页面。这是url:Php 在live server中实现linkedin登录,php,linkedin,Php,Linkedin,我已经在我的网站上实现了linkedin登录。用户通过我的网站表单输入用户名和密码,成功登录后,我检索用户信息并将其显示在我的网页中。这在本地主机wampserver中运行良好 但是,当我将其部署到live server时,它无法正常工作。 当我输入linkedin的电子邮件地址和密码时。我被重定向到linkedin页面。这是url: https://www.linkedin.com/uas/oauth2/authorizedialog/submit 这就是我得到的错误 Request Err
https://www.linkedin.com/uas/oauth2/authorizedialog/submit
这就是我得到的错误
Request Error
We’re sorry, there was a problem with your request. Please make sure you have cookies enabled and try again.
Or follow this link to return to the home page.
但是,在localhost中。我被重定向到此页面。我成功地获取了用户信息。
为什么它不能在服务器中工作。这是我的linkedin代码:
<form action="https://www.linkedin.com/uas/oauth2/authorizedialog/submit" method="POST" name="oauth2SAuthorizeForm" novalidate="novalidate" class="grant-access" data-jsenabled="check">
<input type="hidden" name="isJsEnabled" value="true">
<div class="login">
<p class="description">Sign in to LinkedIn and allow access:</p>
<ul>
<li class="email-input">
<label for="session_key-oauth2SAuthorizeForm" id="yui-gen1" style="display: none;">Email</label>
<script id="controlinit-http-12157-7141289-1" type="text/javascript+initialized" class="li-control">
/* extlib: _ghostlabel */
LI.Controls.addControl('control-http-12157-7141289-1', 'GhostLabel', {});
</script>
<div class="fieldgroup">
<input type="text" name="session_key" value="" id="session_key-oauth2SAuthorizeForm" autocorrect="off" autocapitalization="off" data-ime-mode-disabled="" placeholder="Email">
<span class="error" id="session_key-oauth2SAuthorizeForm-error"></span>
</div>
<a target="_blank" href="/reg/join">Join LinkedIn</a>
</li>
<li class="password-input">
<label for="session_password-oauth2SAuthorizeForm" id="yui-gen2" style="display: none;">Password</label>
<script id="controlinit-http-12157-7141289-2" type="text/javascript+initialized" class="li-control">
LI.Controls.addControl('control-http-12157-7141289-2', 'GhostLabel', {});
</script>
<div class="fieldgroup">
<input type="password" name="session_password" value="" id="session_password-oauth2SAuthorizeForm" autocorrect="off" autocapitalization="off" maxlength="250" placeholder="Password">
<span class="error" id="session_password-oauth2SAuthorizeForm-error"></span>
</div>
</li>
</ul>
</div>
<ul class="duration">
</ul>
<div class="actions">
<ul>
<li>
<input type="submit" name="authorize" value="Allow access" class="allow">
</li>
<li><a href="http://carwarehouseonline.com/test.php?error=access_denied&error_description=the+user+denied+your+request&state=STATE" class="cancel">Cancel</a></li>
</ul>
<div class="logo">LinkedIn</div>
</div>
<input type="hidden" name="oauth_token" value="na" id="oauth_token-oauth2SAuthorizeForm"><input type="hidden" name="appId" value="" id="appId-oauth2SAuthorizeForm"><input type="hidden" name="client_id" value="1ba8ogpm9e05" id="client_id-oauth2SAuthorizeForm"><input type="hidden" name="scope" value="r_basicprofile r_emailaddress" id="scope-oauth2SAuthorizeForm"><input type="hidden" name="state" value="STATE" id="state-oauth2SAuthorizeForm"><input type="hidden" name="redirect_uri" value="http://127.0.0.1:8088/linkedin/test.php" id="redirect_uri-oauth2SAuthorizeForm"><input type="hidden" name="scope_id" value="1001" id="scope_id-oauth2SAuthorizeForm"><input type="hidden" name="authorized" value="true" id="authorized-oauth2SAuthorizeForm"><input type="hidden" name="csrfToken" value="ajax:4651646934577528060" id="csrfToken-oauth2SAuthorizeForm"><input type="hidden" name="sourceAlias" value="0_9DsHd_bZgogqUxUum9_VlTBWJMUCeow0cdGxvyKqdV8" id="sourceAlias-oauth2SAuthorizeForm">
</form>
登录LinkedIn并允许访问:
-
电子邮件
/*extlib:_ghostlab*/
LI.Controls.addControl('control-http-12157-7141289-1','ghostlab',{});
-
密码
LI.Controls.addControl('control-http-12157-7141289-2','ghostlab',{});
-
LinkedIn
无法正确捕获会话。请仔细查看会话代码。我猜回调发生了错误。用户应重定向回您的应用程序。请再次检查您的请求uri我已加倍检查。请求uri在localhost中正确重定向了我,但在live server中没有