debugger; -6ren">
gpt4 book ai didi

javascript - Linkedin 分享计数按钮 secureAnonymousFramework 错误

转载 作者:行者123 更新时间:2023-12-03 03:52:43 25 4
gpt4 key购买 nike

我正在实现链接到网页的共享计数按钮。这是我的 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 ) 当协议(protocol)以“file://”开头时失败。在远程主机上,它将正常工作。

关于javascript - Linkedin 分享计数按钮 secureAnonymousFramework 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45097973/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com