I am trying to use ShareThis widget for my sharing needs, so I have the following:

<span class='st_facebook_hcount' displayText='Facebook'></span>
<span  class='st_twitter_hcount' displayText='Tweet'></span>
<span class='st_plusone_hcount' displayText='Google +1'></span>
<span  class='st_email_hcount' displayText='Email'></span>

var switchTo5x=true;
                $.getScript("http://w.sharethis.com/button/buttons.js", function(){
                    stLight.options({publisher: "c68c8f6c-c670-419b-b8e2-23772e22a861", doNotHash: false, doNotCopy: false, hashAddressBar: false, popup: 'false'});
                });

now the issue is that when I click on facebook it always opens up a new window. I've already mentioned that I wanted this in a popup. For Twitter it works just fine. Why is this? Here's a jsFiddle to demo the issue

有帮助吗?

解决方案

Based on their docs, you can not achieve this unless the button they click on is the sharethis or email button. If you do find a solution/hack, please let me know :-)

其他提示

In case anyone stumbles across this, they have now added the ability to do this. Add servicePopup: true to your stLight.options.

<script type="text/javascript">
stLight.options({
  publisher: "YOUR PUBLISHER KEY",
  servicePopup: true
});
</script>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top