我正在尝试LinkedIn的会员资料插件生成器:https://developer.linkedin.com/plugins/member-profile
它生成了一些脚本标记以包含在HTML页面中:
<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/MemberProfile" data-id="<Profile URL>" data-format="inline" data-related="false"></script>
当我在我的页面上插入代码时,它在控制台中生成错误:
secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:463 Uncaught TypeError: Cannot read property '2' of null
getLocation @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:463
prepareTransportStack @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:556
easyXDM.Rpc @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:637
place @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3092
E @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:2097
E @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:2090
B @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:320
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1774
E @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1779
E @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:307
window.IN.parse @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:1788
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3269
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3270
(anonymous function) @ secureAnonymousFramework?v=0.0.2000-RC8.44973-1428&:3290
答案here没有帮助。
答案 0 :(得分:0)
我在localhost上遇到了同样的问题: secureAnonymous javascript文件中有一个正则表达式,它试图检测您当前的页面。 (https://platform.linkedin.com/js/secureAnonymousFramework) 协议以'file://'开头时失败。在远程主机上,它将正常工作。