2011-05-09 35 views
0

我試圖從此頁面實施Tweet按鈕http://dev.twitter.com/pages/tweet_button如何,Tweet按鈕示例代碼有幫助嗎?

而且它看起來像ti並不適合我。如果我的網站是www.xxx.com腳本應該是:

<a href="http://twitter.com/share?url=http%3A%2F%2Fdev.twitter.com%2Fxxx" class="twitter-share-button">Tweet</a> 

顯卡負載,但是計數爲0

我不明白,這可能是錯誤的。 有什麼想法?

謝謝

+1

我可能會選擇一個不同的例子網址... :) – 2011-05-09 16:09:47

回答

0

試試這個代碼,使用jQuery

<img id="tweetButton" style="cursor:pointer;" title="Share this on Twitter" src="http://a3.twimg.com/a/1294785484/images/goodies/tweetn.png" /> 

$("#tweetButton").click(function() { 
      window.open("http://twitter.com/share?url=xxx", "tweet", "status=0,toolbar=0,width=500,height=300"); 
}); 
-1

您需要在twitter開發者網站上註冊該功能。一旦你這樣做,它應該產生一些數字或代碼給你放在你的頁面上,將所有東西鏈接在一起並開始計算。

+0

的Tweetbutton不需要任何登記。 – abraham 2011-05-10 06:04:01