Javascript 请求访问的帧具有';https';,正在访问的帧的协议为';http';对于Linkedin

Javascript 请求访问的帧具有';https';,正在访问的帧的协议为';http';对于Linkedin,javascript,linkedin,Javascript,Linkedin,我正在尝试使用Linkedin的connections API。当我使用make调用时,它返回一个错误: Unsafe JavaScript attempt to access frame with URL http://www.*example*.com/ from frame with URL https://api.linkedin.com/uas/js/xdrpc.html?v=0.0.2000-RC1.26335-1404#www.*example*.com&xdm_c=def

我正在尝试使用Linkedin的connections API。当我使用make调用时,它返回一个错误:

Unsafe JavaScript attempt to access frame with URL http://www.*example*.com/ from frame with URL https://api.linkedin.com/uas/js/xdrpc.html?v=0.0.2000-RC1.26335-1404#www.*example*.com&xdm_c=default4901&xdm_p=1&mode=cors. The frame requesting access has a protocol of 'https', the frame being accessed has a protocol of 'http'. Protocols must match.
有人知道为什么会发生这种错误吗


非常感谢你的帮助

它与http/https位无关

将“&callback=?”添加到您正在调用的URL,它将发挥一些神奇的作用

像这样

var url = "https://api.instagram.com/v1/users/" + id + "?access_token=" + instagramtoken +  + "&callback=?"
在StackOverfow的某个地方看到了这个解决方案,但cannor记得在哪里。它解决了我的问题


hth

我认为它说,使用JavaScript调用LinkedIn api的页面有一个http://URL,但应该是https://,不是吗?错误是说“父页面和iframe都需要使用相同的协议。”这意味着它们都必须是http或https。您不能混合使用它们。您是在使用Ajax调用,还是在嵌入Iframe?