Few days ago I tried to add Facebook and twitter share button to my blog but failed. By much effort I found these codes at different place on the web. I thought that these codes should be together so that anyone can easily find it, that’s way I write this post. Here are the code checks it out. Just copy the code that you like and paste it on your blog or website.
Stu<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();</script>
<!-- Medium Button -->
<a class="DiggThisButton DiggMedium"></a>
<!-- Compact Button -->
<a class="DiggThisButton DiggCompact"></a>
StumbleUpon Voting button code:
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
Delicious Save button Code:
For wordpress
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://delicious-button.googlecode.com/files/jquery.delicious-button-1.0.min.js"></script>
<a class="delicious-button" href="http://delicious.com/save">
<!-- {
url:"<?php the_permalink() ?>"
,title:"<?php the_title(); ?>"
,button:"wide"
} -->
Save on Delicious
</a>
For Blogger
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://delicious-button.googlecode.com/files/jquery.delicious-button-1.0.min.js"></script><a class='delicious-button' href='http://delicious.com/save'>
<!-- {
url:"<data:post.url/>"
,title:"<data:post.title/>"
,button:"wide"
} -->
Save on Delicious
</a>
Retweet Button Code:
<script type="text/javascript">
tweetmeme_source = 'username';
tweetmeme_style = 'normal';
tweetmeme_service = 'bit.ly';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
Replace 'username' with your twitter username. If you want compact retweet button, then replace “normal” with “compact”.
Facebook Like button code:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:40px">
If you like the post Don't forget to comment and share this post.
No comments:
Post a Comment