我无法使用领英账号登陆我的应用,我看到了一个带有“噢哦!”的领英登录对话框。该怎么办?为什么领英Oauth不起作用?
function onLinkedInLoad() {
IN.Event.on(IN, "auth", function() {onLinkedInLogin();});
IN.Event.on(IN, "logout", function() {onLinkedInLogout();});
}
function onLinkedInLogin() {
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl", "emailAddress"])
.result(function(result) {
console.log(firstName);
})
.error(function(err) {
alert(err);
});
}
function liAuth(){
//
IN.User.authorize(function(){
callback();
});
//IN.UI.Authorize().place();
}
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
api_key: 54545645645646
authorize: false
onLoad: onLinkedInLoad
</script>
<div onclick="liAuth()" class="loginsocbutton loginsocbutton__in" id="oauth_linkedin">click</div>