Pregunta

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

Everything I can find (http://blog.sharethis.com/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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top