ShareThis opens up facebook share in a new window

1.3k views Asked by At

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

2

There are 2 answers

0
C. S. On BEST ANSWER

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 :-)

0
Sean Loyless On

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>