How to Customise ShareThis Settings – ShareThis

Hey everyone,

I’ve just added ShareThis to a website I’m currently working on. It’s basically a generator for all your typical social network plugins (Facebook Like, Twitter Share, Google+ etc). The main advantage I’ve found with using it is the detailed analytics.

While I haven’t had any major issues, there were a few customisations I had to make:

Change Title in ShareThis
Changing the title is pretty easy, simply use the st_title attribute:

<span class='st_googleplus_vcount' displayText='Google+' st_title='My Title'>

Change/Set the URL that is Shared
I needed to set this when generating content via ajax to ensure that the correct URL was shared. Again, it’s pretty straight forward – just use the st_url attribute.

<span class='st_googleplus_vcount' displayText='Google+' st_url='' st_title='My Title'>

Re-initialising ShareThis buttons when using ajax
A follow on from the last issue is that ShareThis buttons will need to be reinitialised if additional content is generated via ajax:

//Re-initialise ShareThis
if (stButtons){

There’s a bit more info here, via this StackOverflow post:

Leave a Reply