문제

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