Linkedin 分享计数按钮 secureAnonymousFramework 错误
Linkedin share count button secureAnonymousFramework error
我正在将共享计数按钮链接到网页。这是 HTML 和我的 JS 代码
<li>
<script type="IN/Share" data-url="<?php echo $linkedin_url; ?>" id="<?php echo $id; ?>" data-counter="top"></script>
<script>
debugger;
if (typeof (IN) != 'undefined') {
IN.parse();
} else {
opjq.getScript("http://platform.linkedin.com/in.js");
}
</script>
</li>
在控制台中我得到 javascript 错误
secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1406 Uncaught TypeError: Cannot read property 'className' of null
at Object.addClass (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1406)
at B.<anonymous> (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:2926)
at B.setContent (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:308)
at B.<anonymous> (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1900)
at B.setCountFormatted (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:308)
at o (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1937)
at b (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1939)
at Function.handleCount (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1908)
at share?url=http%3A%2F%theme.app%2Fwp-admin%2Fadmin.php%3Fpage%page-b…:1
有人知道这个错误吗?
我尝试在本地测试时收到相同的错误消息。
secureAnonymous javascript 文件中有一个正则表达式,它会尝试检测您当前所在的页面。
(https://platform.linkedin.com/js/secureAnonymousFramework) 当协议以 'file://' 开头时失败。在远程主机上,它将正常工作。
我正在将共享计数按钮链接到网页。这是 HTML 和我的 JS 代码
<li>
<script type="IN/Share" data-url="<?php echo $linkedin_url; ?>" id="<?php echo $id; ?>" data-counter="top"></script>
<script>
debugger;
if (typeof (IN) != 'undefined') {
IN.parse();
} else {
opjq.getScript("http://platform.linkedin.com/in.js");
}
</script>
</li>
在控制台中我得到 javascript 错误
secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1406 Uncaught TypeError: Cannot read property 'className' of null
at Object.addClass (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1406)
at B.<anonymous> (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:2926)
at B.setContent (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:308)
at B.<anonymous> (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1900)
at B.setCountFormatted (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:308)
at o (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1937)
at b (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1939)
at Function.handleCount (secureAnonymousFramework?v=0.0.2000-RC8.61320-1429&:1908)
at share?url=http%3A%2F%theme.app%2Fwp-admin%2Fadmin.php%3Fpage%page-b…:1
有人知道这个错误吗?
我尝试在本地测试时收到相同的错误消息。 secureAnonymous javascript 文件中有一个正则表达式,它会尝试检测您当前所在的页面。 (https://platform.linkedin.com/js/secureAnonymousFramework) 当协议以 'file://' 开头时失败。在远程主机上,它将正常工作。