2012-09-09 20 views
1

我想在我的網站上使用ShareThis,併爲同一服務添加多個按鈕以共享多個對象。這是可能的,但我只能讓按鈕處於其中一種默認樣式。我怎樣才能通過JavaScript添加按鈕,並仍然讓他們與自定義圖像?如何添加動態定製的ShareThis按鈕?

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" 
     }); 

回答

1

沒問題,使用TYPE =「定製」做對文檔的trick..wasn't,至少我無法找到它!

+0

我在文檔中看到這個,但ShareThis不生成任何HTML。它是否爲你自動生成HTML? –

0

只需創建新按鈕並將它們放在您的服務器上。像 這個:

"image":"http://www.MYOWNSERVER.com/images/myart.png