I am using the ShareThis service on a project. I needed a way to dynamically create the chicklets (buttons) for many entries.

ShareThis has an API stWidget.addEntry to do just that:

var chicklets = [ "facebook", "twitter" ]  
  , ulEl = document.createElement( "ul" )
  , liEl
  , stIndex
;

for( stIndex in chicklets ) {

    liEl = document.createElement( "li" );
    ulEl.appendChild( liEl );

    stWidget.addEntry({
        'service'  :   chicklets[ stIndex ],
        'element'  :   liEl,
        'type'     :   'chicklet',
        'url'      :   'http://webtonio.com',
        'title'    :   'Webtonio',
       'summary'   :    'ShareThis demo'
    });
}

document.body.appendChild( ul );  

Make sure the you include the ShareThis api path link:

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

Here’s a sample on JS BIN.