admin 管理员组

文章数量: 1086019

I want to customise the "via @sharethis" part of the sharethis Twitter share button.

Everything I can find (/ for example) says to add st_via="TwitterUsername" to the ShareThis span <span class="st_twitter" st_via="TwitterUsername">… however, I am dynamically adding the buttons so am unable to do this.

Here is how I create the buttons:

var defaults = {
            "service": "twitter",
            "element": …,
            … etc,
}

stWidget.addEntry(defaults);

How can I customise or remove the "via @ShareThis" part of the resulting twitter share button?

I want to customise the "via @sharethis" part of the sharethis Twitter share button.

Everything I can find (http://blog.sharethis./2012/04/30/via-sharethis-is-here-2/ for example) says to add st_via="TwitterUsername" to the ShareThis span <span class="st_twitter" st_via="TwitterUsername">… however, I am dynamically adding the buttons so am unable to do this.

Here is how I create the buttons:

var defaults = {
            "service": "twitter",
            "element": …,
            … etc,
}

stWidget.addEntry(defaults);

How can I customise or remove the "via @ShareThis" part of the resulting twitter share button?

Share Improve this question asked May 7, 2013 at 7:59 Ned MartinNed Martin 5327 silver badges13 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

Boss, just add the st_via="[@theathere]" attribute to the span

<span id='twitter' class='twitter' st_via='[@theathere]'></span>

<script type='text/javascript'>
   var defaults = {
            "service": "twitter",
            "element": …,
            … etc,
   }

   stWidget.addEntry(defaults);

</script>

it will automatically add the st_via='' try it.

本文标签: javascriptRemove or customise quotvia ShareThisquot when adding ShareThis button dynamicallyStack Overflow