javascriptsharethis

How to add dynamic customized ShareThis button?


I would like to use ShareThis on my site and add multiple buttons for the same service to share multiple objects. This is possible but I could only get the buttons to be in one of the default styles. How can I add buttons through javascript and still get them with a customized image?

stWidget.addEntry({
            "service":"facebook",
            "element": $('.fb_custom').get(1),
            "url":"http://sharethis.com",
            "title":"sharethis",
            "type":"large", // one of the default styles
            "text":"ShareThis" ,
            "image":"http://www.softicons.com/download/internet-icons/social-superheros-icons-by-iconshock/png/256/sharethis_hulk.png", // image TO BE SHARED
            "summary":"this is description1"   
        });

Solution

  • No problem, using type="custom" did the trick..wasn't on the doc, at least I couldn't find it!