IN.User.Authorize回调永远不会被解雇

kla*_*nte 7 linkedin linkedin-j linkedin-jsapi linkedin-api

从今天开始,我们使用linkedin javascript SDK对用户进行身份验证的应用程序停止了工作.我们意识到,在调用https://platform.linkedin.com/in.js现在重定向到 https://platform.linkedin.com/xdoor/scripts/in.js.

因此,调用IN.User.Authorize(callbackFunction)成功打开身份验证对话框窗口,但不再触发回调.

此外,在我们的应用程序的另一部分中,我们使用IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)跟踪对话框关闭.此功能也停止了措辞,现在打开一个带有url的新窗口,invalid://控制台抛出此错误:

jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
?
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7 
?
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Run Code Online (Sandbox Code Playgroud)

你知道为什么停止工作吗?

编辑:错误再次出现2019年01 28.

Nav*_*ody 1

尝试用 window.IN.user.authorize 替换 window.IN.User.authorize

window.IN.user.authorize返回一个承诺,并在登录成功后执行成功回调。这很奇怪,但如果我们用 user 替换 User 就可以了

window.IN.user.authorize().then(function(data){
                    console.log("Logged in successfully .");
                    window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData) {
                        that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
                    });
                },function(error){
                    alert("Linkedin failed because of harshita !");
                });   
Run Code Online (Sandbox Code Playgroud)