2012-04-14 22 views
0

TwitterとGoogle PlusのAPIにあまり慣れていません。誰かが私の問題に光を当てることができますか? Twitter、Google Plus、Stumble Uponボタンにカウンタを追加したい。これは私のワードプレスの投稿とページに統合されます。私は既にFacebookのボタンを実装したと思う。残っている唯一の問題は、Twitter、Google Plus、Stumble Upon(オプション)です。twitterやgoogle plusのようなソーシャルメディアにカウンタを追加する

ありがとうございました!

<!-- 
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

0

あなたはカウンターを取得するためにjQueryを使用することができます...

私はありません主旨を持っていますそれはFacebookのためのものです。Pinterest and Twitter https://gist.github.com/andrefrd/9520512

関連する問題