Direct-Post Share Widget Properties

 
 

ShareThis provides a customizable sharing experience through the use of JavaScript and CSS based element selection. While the default options may work for some, our provided sharing options make it possible to fully configure the sharing options of any button on the page.

Customizing individual sharing options creates more engaging shares by providing detailed information about individual elements (picture,video,article) on a page. This create a much richer share on sites who may have lots of content on a single page.



Global Share Properties

stLight.options



Name Definition Default Requirement
publisher Your unique ShareThis publisher key null Required
tracking Set to 'google' to enable GA tracking null Optional
doneScreen Toggles Popular Shares screen on and off true Optional
onhover Opens widget when user hovers over button true Optional
embeds Disables embeddable objects while widget loads false Optional
headerTitle Adds a Title to your ShareThis iframe false Optional
headerbg Specify the back ground color of your header #CCCCCC Optional
headerfg Specify the text color of your header #FFFFFF Optional

Example
This code will create a ShareThis button with Google Analytics tracking enabled and embeddable content visible while the iframe is open

		<span class="st_sharethis"></span>

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

 

Share Properties

stWidget.addEntry

 

Name Definition Default Requirement
service Specifies which social service to share to null Required
element Selects which CSS class to append the share button to null Required
type Specifies what type of button to use.

 

chicklets Optional
url The url of the shared page. document.location.href Optional
title The title of the page; if no title is specified than the url becomes the default title document.title Optional
image The url of an image to use in the share null Optional
text Change the text that appears with the button null Optional

Example

			<span class="st_sharethis" ></span>

<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
        stWidget.addEntry({
                publisher:'12345',
                element:'container',
                type:'chicklets',
        });
</script>