Javascript ShareThis在自定义div上不起作用

Javascript ShareThis在自定义div上不起作用,javascript,sharethis,Javascript,Sharethis,我用这两种方法。右侧使用内置按钮。我在页面顶部写了一些自定义的og,这样它就可以将整个网站作为一个整体引用,而不仅仅是这个博客。 在这篇文章的内容中,我在Facebook上分享了这篇文章 <div data-network="facebook" data-url="http://test.cota.org/campaigns/COTAforTimothyA/blog/Images-How-will-they-appear-just-to-rename">Share This Post

我用这两种方法。右侧使用内置按钮。我在页面顶部写了一些自定义的og,这样它就可以将整个网站作为一个整体引用,而不仅仅是这个博客。 在这篇文章的内容中,我在Facebook上分享了这篇文章

<div data-network="facebook" data-url="http://test.cota.org/campaigns/COTAforTimothyA/blog/Images-How-will-they-appear-just-to-rename">Share This Post on Facebook</div>
在Facebook上共享此帖子
我打电话给JS:

<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=MYID&product=custom-share-buttons"></script>


据我所知,data network=“facebook”应该会触发数据url上的共享。就好像什么都没发生一样。共享自定义按钮时我缺少了什么?

我发现自定义div还需要一个类-st custom button-来让它们工作


它实际上并没有在任何地方这样说,这就是为什么我没有这么做的原因,但我最终注意到它出现在第页的一个示例中,所以我想我应该试试。而且很有效。你是否在页面顶部添加了sharethis js