我刚刚在我的网站上实现了ShareThis的facebook分享按钮,我可以分享,但是,我想在模式(弹出窗口)中打开确认对话框,而不是每次都在新选项卡中打开.
我看了一下ShareThis的文档,here它说我只需要传递popup:’true’在参数初始化时,我已经完成了,但它没有任何效果,任何时候按下按钮它打开了一个新标签.
这是我的代码:
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script> <script type="text/javascript"> //init stLight.options({popup:'true',publisher: "abcdef-1234-1234-1234-1234abcdef1234",doNotHash: false,doNotCopy: false,hashAddressBar: false}); //create widget stWidget.addEntry({"service":"facebook","element":document.getElementById('fb_share_button'),"url":"http://www.site.com/link/to/share/","title":"Title","type":"hcount" }); </script> <span st_url="<!-- url is assigned dynamically -->" class='st_facebook_hcount' displaytext='Facebook' id="fb_share_button"></span>