Integrate with a Web Site

 

Overview

Adding sharing buttons to your site is easy. Just remember to follow these three simple rules:

  • Register - You'll need to register (it's free!) to obtain a publisher key for your button.
  • Get Button - Choose a button from our Get Button Page to generate your code.
  • Add Your Code - Paste your generated code from the Get Button Page to your website. Done!
 

Getting The Code

If you haven't already done so, we suggest registering first. If your already a ShareThis user, go ahead and sign-in. Once you've signed in, navigate to the Get Button Page.

 

 


Choose Site Type

Once your arrived to the Get Button Page, click on the Any Website option. This assumes you are not using WordPress, Blogger or TypePad to host your website.

 

 

 


Choose a Button Type

Select from any of our available button types.

 

 

 


Choose a Button Style

Each button type may have 2-3 styles. Click a style that suits you best.

 

 

 


Confirm Your Changes

Once you're satisfied with your customized button, click Get the Button to generate your button code.

 

 

 


Generated Code

Your generated code should now be displayed. Read on to see how this code is added to a website

 
 

Adding The Code

Your generated button code should come in two parts: HTML and JavaScript.

HTML

The HTML code can be placed anywhere between the <body> tags on your page. This code tells ShareThis what type of button and social service to use. To learn more about styling our buttons, visit the Customization section.

Example

		 
<span class="st_twitter_large" displayText="Tweet"></span>
<span class="st_facebook_large" displayText="Facebook"></span>
<span class="st_ybuzz_large" displayText="Yahoo! Buzz"></span>
<span class="st_gbuzz_large" displayText="Google Buzz"></span>
<span class="st_email_large" displayText="Email"></span>
<span class="st_sharethis_large" displayText="ShareThis"></span>

Note: Your HTML may look different depending on what button and styles you choose.

JavaScript

Adding the JavaScript code to your website is essential. Without it the buttons wouldn't work. We recommend placing this code between the <head> tags on your pages. To learn more about our available JavaScript options, visit the Customization section.

Example

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

Note: Be sure to insert your own Publisher ID when implementing the code.