LinkedIN集成JSAPI

LinkedIN集成JSAPI,linkedin,Linkedin,我们正在与Linked IN集成以提取用户配置文件。它工作正常,但我们注意到在一些Windows7/IE9机器中,链接弹出窗口出现并且是空白的。我们在控制台中看到以下错误 消息:对象不支持属性或方法“替换” 电话:861 字符:17 代码:0 URI: 下面的代码片段 <script type="text/javascript" src="https://platform.linkedin.com/in.js?async=false" > api_key: tw6oqfav7ms

我们正在与Linked IN集成以提取用户配置文件。它工作正常,但我们注意到在一些Windows7/IE9机器中,链接弹出窗口出现并且是空白的。我们在控制台中看到以下错误

消息:对象不支持属性或方法“替换” 电话:861 字符:17 代码:0 URI:

下面的代码片段

<script type="text/javascript" src="https://platform.linkedin.com/in.js?async=false" >
  api_key: tw6oqfav7ms1
  authorize:false  
</script> 

//We have a custom image for linkedIN, onclick of the same below code is called.
$("#mylinkedin").click(function () {
  IN.UI.Authorize().params({"scope":["r_fullprofile", "r_emailaddress","r_contactinfo"]}).place();
  IN.Event.on(IN, "auth", onLinkedInAuth);
});

function onLinkedInAuth() {    
    IN.API.Profile("me").fields([ "id","firstName", "location","lastName","skills","positions","educations","languages","phone-numbers","certifications","emailAddress","mainAddress"]).result(displayProfiles);
    IN.User.logout(); //After we take the data, we do a log out
    $.get("https://api.linkedin.com/uas/oauth/invalidateToken");
}

function displayProfiles(profiles) {
 //Access profile and process
 member = profiles.values[0]
 ...........
}

api_键:tw6oqfav7ms1
授权:假
//我们有一个linkedIN的自定义图像,单击下面相同的代码即可调用。
$(“#mylinkedin”)。单击(函数(){
IN.UI.Authorize().params({“范围”:[“r_fullprofile”,“r_emailaddress”,“r_contactinfo”]}).place();
IN.Event.on(在“auth”中,onLinkedInAuth);
});
函数onLinkedInAuth(){
在.API.Profile(“me”)字段中([“id”、“名字”、“位置”、“姓氏”、“技能”、“职位”、“学历”、“语言”、“电话号码”、“证书”、“电子邮件地址”、“主地址”))。结果(displayProfiles);
IN.User.logout();//获取数据后,我们将注销
$.get(”https://api.linkedin.com/uas/oauth/invalidateToken");
}
函数显示配置文件(配置文件){
//访问配置文件和过程
成员=配置文件。值[0]
...........
}

我还没有机会对此进行测试,但在我看来,您似乎在代码中引入了竞争条件,特别是在
onLinkedInAuth()

调用.API.Profile()中的
调用对LinkedIn的异步调用,该调用在.User.logout()中的
中的JavaScript引擎运行时可能尚未完成

我将代码更改为以下代码,以查看这是否解决了问题:

IN.API.Profile("me")
  .fields([ "id","firstName", "location","lastName","skills","positions","educations","languages","phone-numbers","certifications","emailAddress","mainAddress"])
  .result(function(profile) {
    displayProfiles(profile);
    IN.User.logout(); //After we take the data, we do a log out
    $.get("https://api.linkedin.com/uas/oauth/invalidateToken");
  });

谢谢你的回复。我自己就能够解决这个问题。我们观察到,在带有IE9的Win7机器中,链接授权弹出窗口是空白的。当我取消选中“启用受保护模式”时,弹出的窗口不会出现任何问题。

Hi,你知道我们如何获得实际的个人资料图像吗?这意味着没有linkedin图像。。