简体   繁体   English

LinkedIn:使用linkedin按钮自动登录,而无需按下按钮

[英]LinkedIn: Auto Login using linkedin button without pressing the button

I have created the Linkedin sign for my application and where I am in need of to do auto login using linkedin without pressing linkedin button (ie , Automatic login using linkedin It should onloading of button). 我已经为我的应用程序创建了Linkedin标志,并且需要在不使用linkedin按钮的情况下使用Linkedin自动登录(即,使用linkedin自动登录,应在按钮上加载)。 Here I have tried the following code. 在这里,我尝试了以下代码。

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
    api_key: key comes here
    onLoad: onLinkedInLoad
    authorize: true
</script>

But I never get correct answer.. 但是我从来没有得到正确的答案。

You should include IN.User.authorize(); 您应该包含IN.User.authorize();

like this 像这样

function onLinkedInLoad() {
                IN.ENV.js.scope = new Array();
                IN.ENV.js.scope[0] = "r_emailaddress";
                IN.ENV.js.scope[1] = "r_contactinfo";  
                IN.User.authorize();
                IN.Event.on(IN, "auth", onLinkedInAuth);
            }

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

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