English 中文(简体)
添加反社会媒体,如tw和 go角加
原标题:Add counter to social medias like twitter and google plus

我不熟悉“Twitter”和“谷歌加”的APIC。 一些人能否从我的角度来看问题? 我要补充我的“推特”、“谷歌加”和“松.”的反响。 这一点将纳入我的文字压缩员额和网页。 我认为,已经落实了书状。 我唯一剩下的问题是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>
最佳回答

页: 1

页: 1

问题回答
 <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>

You can use jQuery to get the counters...

I have a gist that does that for Facebook Pinterest and Twitter https://gist.github.com/andrefrd/9520512





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签