2012-04-14 29 views
0

我不太熟悉Twitter和Google Plus的API。有人能夠解決我的問題嗎?我想爲我的Twitter,Google Plus和Stumble Upon按鈕添加一個計數器。這將被整合到我的wordpress文章和頁面中。我認爲已經實施了facebook按鈕。我唯一剩下的問題是Twitter,Google Plus和Stumble Upon(可選)。將計數器添加到社交媒體,如twitter和谷歌加

謝謝!

<!-- 
Facebook 
///////////////// 
--> 
    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> 

    <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink()); ?>&t=<?php echo urlencode(get_the_title()); ?>" name="fb_share" type="box_count" target="_blank" id="facebook"> 
    Share 
</a> 


<!-- 
Twitter 
///////////////// 
--> 

<a href="http://twitter.com/share?url=<?php echo urlencode(get_permalink()); ?>&text=<?php echo urlencode(get_the_title()); ?>" class="twitter-share-button" id='twitter' target="_blank"> 
    Tweet 
</a> 


<!-- 
Google Plus 
///////////////// 
--> 

<a href="https://m.google.com/app/plus/x/?v=compose&content=<?php echo urlencode(get_permalink()) . " " . urlencode(get_the_title()); ?>" id='gplus' target="_blank"> 
    Google Plus 
</a> 


<!-- 
Stumble Upon 
///////////////// 
--> 

<a href="http://www.stumbleupon.com/submit?url=<?php echo urlencode(get_permalink()); ?>" target="_blank" id='stumble'> 
    Stumble 
</a> 

回答

0
<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:50px;top:160px;"> 
<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a> 
<a class="addthis_button_tweet" tw:count="vertical"></a> 
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a> 
<a class="addthis_counter"></a> 
</div> 
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true}; </script> 
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5178354276acf324"></script> 
+0

It可以工作,但是你能否向你的代碼塊添加一點解釋? – Makoto 2013-04-26 05:41:59

相關問題