Вот код из моего проекта.Надеюсь, вы могли бы использовать его.
// define attributes for buttons
settings.share_buttons = [
['facebook','st_facebook_large','Facebook','Share on Facebook'],
['twitter','st_twitter_large','Tweet','Share on Twitter'],
['pinterest','st_pinterest_large','Pinterest','Share on Pinterest'],
['linkedin','st_linkedin_large','LinkedIn','Share on LinkedIn'],
['googleplus','st_googleplus_large','Google +','Share on Google +']
]; //[service,class,displayText,title]
// all code under could be placed into a function and bind on a click event
// (don't forget about variable with URL, 'our_link_to_share').
//if block with buttons already exists
if (document.getElementById('share_this_id')){
$('#share_this_id' > span').each(function(){
$(this).removeAttr('st_url').attr('st_url',our_link_to_share).empty();
stWidget.addEntry({
"service":$(this).prop('service'),
"element":this,
"url":$(direct_link).prop('value'),
"title":$(this).prop('title'),
"type":"large",
"text":$(this).prop('displayText'),
"image":"http://www.softicons.com/download/internet-icons/social-superheros-icons-by-iconshock/png/256/sharethis_hulk.png",
"summary":"My site"
});
});
}// if not, we'll create it
else{
$('body').append($('<div>').prop('id', share_this_id).prop('class', 'share_this'));
var share_this = document.getElementById('share_this_id');
for(i=0; i<settings.share_buttons.length; i++){
$(share_this).append($('<span>').attr('st_url', our_link_to_share).prop('class', settings.share_buttons[i][1]).prop('displayText', settings.share_buttons[i][2]).prop('title', settings.share_buttons[i][3]).prop('service', settings.share_buttons[i][0]));
}
}
if (stButtons){stButtons.locateElements();},