Am I using the sharethis API correctly?

Am I using the sharethis API correctly?

I think the answer to my questions are:

a. Yes, there is something wrong with using sharethis in this manner. Your access key will be visible to everyone.

b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons classes to st_[service]_custom (where service is the service you would like to access).

That is, put I put this in my header:

<script type=text/javascript src=http://w.sharethis.com/button/buttons.js></script>
<script type=text/javascript>stLight.options({publisher: 1234});</script>

and this in the body:

<span class=st_pinterest_custom>Pinterest</span>
<span class=st_twitter_custom>Twitter</span>
<span class=st_facebook_custom>Facebook</span>
<span class=st_googleplus_custom>Google</span>
<span class=st_stumbleupon_custom>Stumble</span>

Then I just style the buttons using my own CSS.

Works like a charm, thanks sharethis!

Also, if anybody needs general help making things more complicated than they need to be, ask me — I can do it for you in a jiffy!

I think the answers to my questions are:

a. Yes, there is something wrong with using sharethis in this manner. My access key will be visible to everyone.

b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons classes to st_[service]_custom (where service is the service you would like to access).

That is, put I put this in my header:

stLight.options({publisher: 1234});

and this in the body:
Pinterest
Twitter
Facebook
Google
Stumble

Am I using the sharethis API correctly?

Leave a Reply

Your email address will not be published.