Build Online Store! | Penguin Panda Series - New! | 4 Rules To Make Money | SEO Settings | Facebook Popup 1, 2, 3 | Mashable 1 , 2


Saturday, April 9, 2011

Add Floating Facebook Like and Retweet Counters To Your Websites


Pin It

floating-sharing-widget

UPDATED:  Problem Solved now happily use the new working code :>

Since it is weekend so I thought lets  play with some CSS again. Facebook Like Button and retweet counter by tweetmeme are the two most widely used social media widgets without which you can’t call a blog a blog. Both these buttons along with Stumble Upon bookmarking button can let your readers circulate/share your tutorials and articles with their interested collegues and friends connected to them via these social networks. With a little HTML spiced with CSS we succeeded in creating a floating widget that will include these three buttons and will stay fixed at the middle lift side of your websites. The widget settings can surely be changed to align it to the right, bottom or left if you wish. You can also add more buttons to it if you wish like DIGG for instance.  See a demo first,

 

Live Demo

 

How To add Floating Facebook Like, Retweet and Stumble Upon Counter to Blogger?

  1. Go To Blogger > Design
  2. Select HTML/JavaScript Widget from anywhere (Position doesn’t matter)
  3. Inside it paste the code below,

    <div style="display:scroll; position:fixed; top:40%; left:2%; border: 1px dotted #E8E8E8; padding:0px 0px 0px  5px; height:220px; width:53px ">
    <table cellpadding="1px" cellspacing="0">
    <tr>
    <td style="border-bottom: 1px solid #E8E8E8; padding:5px 0 2px 0;"> 
    <div id='fb-root'/><script src='http://connect.facebook.net/en_US/all.js#xfbml=1'/><fb:like font='' href='' layout='box_count' send='false' show_faces='false'/>
    </td>
    </tr>

    <tr>
    <td style="border-bottom: 1px solid #E8E8E8; padding:5px 0px;">
    <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
    </td>
    </tr>

    <tr>
    <td style="border-bottom: 0px solid #E8E8E8; padding:5px 0 0px 0;">

<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="mybloggertricks">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
    </td>
    </tr>

    </table>
    </div>

 

     4.    Simply replace mybloggertricks with your twitter username.

     5.    Save your widget and you are Done!

 

See your blog to find a light and beautiful widget hanging at left side of your blog. Hope you like it! :)


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you Subscribe to our regular Email Updates!

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »


Thanks for making this possible! Kindly Bookmark and Share it.
Technorati Digg This Stumble Facebook Twitter

48 comments:

Comment Page :
azgor #Add Floating Facebook Like and Retweet Counters To Your Websites on 9:47 PM, April 09, 2011 said... #

thanx for this post. i'll add it in my blog

Beben Koben on 1:58 AM, April 10, 2011 said... #

what for display:scroll if that used position:fixed...
cool cool bos :)

Do Lam on 6:13 PM, April 10, 2011 said... #

Facebook and stumpupon buttons are fine, but I got a problem with twitter button. Here is the error message:
Failure: invalid story url specified
This is my blog link:
http://mobimas.blogspot.com/

Mohammad Mustafa Ahmedzai on 9:22 PM, April 10, 2011 said... #

@BEBEN

Then that would make it to float as you go down.


@Do LAm
That's what I mentioned the code by tweetmeme doesn't seem to work and I am scratching my head to find a working code. Glad at least Facebook worked. :>

Anup on 8:08 AM, April 11, 2011 said... #

Nice widget. I'll try this.

Dhananjay Badaya on 12:32 PM, April 11, 2011 said... #

I got a solution for tweetmeme button

Check the link below to get the solution.I can't post the solution here because script tag is not allowed.

http://freetexthost.com/mxiycvz4kf

Candy on 3:59 PM, April 11, 2011 said... #

i want only "facebook like floating button" . please suggest corrections.

Thanks

raj on 5:34 PM, April 11, 2011 said... #

well this did not work for me buddy, i tried this on my blog www.webprogrammingscripts.blogspot.com, i added the code properly in html/javascript widget, but ur retweet button takes me to the error as given below

"TweetMeme Button Error - Invalid
An example of a TweetMeme button with an error, A TweetMeme button with an error

This TweetMeme button is pointing at a URL that has an invalid structure."

what should i do to solve this, is there code failure some where, please guide me at earliest.

thanks

Ayush Agrawal on 6:06 PM, April 11, 2011 said... #

Please tell me if i can use this for wordpress or is there some other code?

Mohammad Mustafa Ahmedzai on 8:14 PM, April 11, 2011 said... #

@badaya
Oh sure but unfortunately Your link is dead bro. Please update it. :>

@candy

In that case use the code below,


<div style="display:scroll; position:fixed; top:40%; left:2%; border: 1px dotted #E8E8E8; padding:0px 0px 0px 5px; height:220px; width:53px ">
<table cellpadding="1px" cellspacing="0">
<tr>
<td style="border-bottom: 1px solid #E8E8E8; padding:5px 0 2px 0;">
<iframe src="http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp; action=like&amp;font&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:65px;" allowtransparency="true"></iframe>
</td>
</tr>

</table>
</div>


@raj
I know dear thats the problem I already mentioned however I am updating the code now so retry again and let me know.

@Ayush
Ofcourse you can but in upgraded version only.

Hari on 12:19 PM, April 12, 2011 said... #

Good :)

By
Hari

Indian Drama Serials on 1:11 PM, April 12, 2011 said... #

This is awesome! I have two questions. 1. The icons are right below my post title. Is there a way to have them at the bottom of the post? 2. Can you check to make sure they are working - not sure the FaceBook Like one is??

Been reading and trying some of your tricks with success - Thank You!

BTW I have your button on my sidebar!

Ajay on 6:06 PM, April 12, 2011 said... #

Nice post Bro.It helped me a lot.I have successfully implemented this in my website.Take a look at this
http://www.techgadz.com/

But i want one help from u bro.
For this floating widget,i want to add digg button in it.So please tell me how i can add Digg button to floating widget.

Bro and also i want ur comment about my blog.Thnx in advance

G on 1:58 AM, April 13, 2011 said... #

Hi Mohammad,

How are you buddy, again thanks for the great tips.
Instead of having floating share button, do you have a code for having the share buttons under the title post or below the post? Kind of like how you have it.

Thanks.

Rick Wilson on 2:07 AM, April 13, 2011 said... #

Thank you for sharing the code with everyone. I could not get the facebook button to work correctly so I went here:
http://developers.facebook.com/docs/reference/plugins/like/

Generated my own code and pasted it between the iframe tags. I hope this tip may help others as well.

Allen | PC Holics on 7:42 PM, April 13, 2011 said... #

I have that one on my blog and I never had a problem with the installation. I only have problems on fetching the feeds on my blog.

Mohammad Mustafa Ahmedzai on 4:30 PM, April 14, 2011 said... #

@Indian Dramas

Dude the widget will get fixed to the left of your template. It will not appear below post titles. I hope this post is what you are looking for,


And thanks for the button. :>

@G
I am fine brother. Thanks for asking :)

Oh sure I have kindly check this post -> Facebook, Twitter, Stumble, Digg Buttons

@Rick Wilson
I am glad it worked for you and thanks for the suggestion pal :>

@Allen
No spam please!

Brohan on 8:25 AM, April 15, 2011 said... #

how is allen spamming? Great blog by the way! :D

Mohammad Mustafa Ahmedzai on 10:31 PM, April 17, 2011 said... #

@Brohan

There is nothing required like Installation in the above post plus no mention of feeds
:>

nazia shah on 3:11 PM, April 18, 2011 said... #

its help full sharing, i like it sir, hope that every one will like this and you will keep it up
Webmaster Tools

Anonymous said... #

ya its nice but ...i dont want ot appear html title !!!its hanging me

Bloggertrix on 11:54 AM, April 21, 2011 said... #

nice post friend.really thanks for it.

http://www.bloggertrix.com/

Ridhuan on 2:07 AM, April 26, 2011 said... #

Hi.. nice tutorial.. i have a tutorial a bit similar to this but it's about using static image buttons.

HP CE278A toner expert on 1:02 PM, April 28, 2011 said... #

I wish I can add the floating sharebar in my wordpress blog without having javascript problem. Gladly, it works with blogspot.

TheShadow on 5:21 PM, June 10, 2011 said... #

Thanks for the tutorial

Gabriel Calil on 11:28 PM, June 18, 2011 said... #

Hi, man!
How can I have this widget without having a twitter account?
I did what you said in the tutorial, but what appeared in my blog was just a deformed twitter button.

Thanks!

Tim in Phuket on 6:37 AM, June 19, 2011 said... #

Thanks for your texts but please tell me how to add a non floating facebook like / stumble / tweet?

thank you

Mushfiq on 11:00 AM, June 23, 2011 said... #

Thanks :)
but how to add adsense in the middle of a post?

Tamika on 11:44 PM, June 27, 2011 said... #

Only the twitter button came up for me, the facebook and other ones didn't appear. :( Do you have a solution? Thanks!!

Muhammad Nadir Siddiqui on 12:41 AM, July 14, 2011 said... #
This comment has been removed by the author.
Muhammad Nadir Siddiqui on 12:43 AM, July 14, 2011 said... #

I added it on my blog:

http://we-dotnet.blogspot.com

only tweeter part is working.
help needed.
Thanks for your help :)

Aazib on 5:07 AM, August 04, 2011 said... #

not working again. it shows only tweet counter

lookers on 2:34 PM, August 06, 2011 said... #

sir , why is it when i use 800x600 resolution ,, i can`t see the two buttons below "google +1 button". help

James Tyson on 10:04 PM, August 07, 2011 said... #

Really nice. I have been visiting MBT ever since I created my own blog http://2earncash-online.blogspot.com and I have earned and applied lots of things.
Thanks Dude
2 Earn Cash-Online
http://2earncash-online.blogspot.com

Mohammad Mustafa Ahmedzai on 11:29 PM, August 07, 2011 said... #

@lookers

The icons are visible only on all resolutions and work best with resolutions bigger than 800 by 600. Please check it first on your test blog.

@james
My pleasure pal.

abdulrafay on 7:11 AM, August 26, 2011 said... #

I added it on my blog:

http://oneworldblogger.blogspot.com

only tweeter part is working.
help needed.
Thanks for your help :)

abdulrafay on 1:59 PM, August 28, 2011 said... #

UPDATED CODE:IN CASE THE ABOVE CODE DON'T WORK FOR YOU


<div style="display:scroll; position:fixed; top:40%; left:2%; padding:0px 0px 0px 5px; height:230px; width:53px ">
<table cellpadding="1px" cellspacing="0">
<tr>
<td style="padding:5px 0 2px 0;">
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=267341659960795&amp;xfbml=1"></script><fb:like href="http://www.facebook.com/pages/One-World-Internet/276646509017063" send="false" layout="box_count" show_faces="false" font=""></fb:like>
</td>
</tr>
<tr>
<td style="padding:5px 0 0px 0;">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="a_rafay2010">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</td>
</tr>
<tr>
<td style="padding:5px 0px;">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
</td></tr></table></div>


REPLACE MY TWITTER AND FACEBOOK TO YOUR USER NAME AND ID.
change this code to html back because it was converted with HTML encoder
THAnKS

Sanket Patil on 5:05 PM, October 16, 2011 said... #

@abdulrafay

thanks abdulrafay for your updated code its help me lots. you can see my blog

sam azgor on 3:53 PM, November 11, 2011 said... #

@abdulrafay i am trying to add your code in my bangla blog

Manu Jain on 12:46 AM, November 17, 2011 said... #

FOR FLOATING FACEBOOK SHARE BUTTON???

Vivek Nath.R on 8:07 AM, November 22, 2011 said... #

I insert that code in a html box but it shows only twitter icon no Stumble Upon and like button.
help me.

Dustin on 9:01 AM, January 18, 2012 said... #

http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/priya-new-hot-and-cute-pics-latest.html
http://cinemaleak.blogspot.com/2012/01/topless-hot-pics-of-gabriella-fhm.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/aishwarya-priyanka-in-dabboo-ratnani.html
http://cinemaleak.blogspot.com/2012/01/malaika-arora-at-launch-of-sunsilk.html
http://cinemaleak.blogspot.com/2012/01/diya-mirza-at-filmfare-nominations-bash.html
http://cinemaleak.blogspot.com/2012/01/bipasha-basu-in-dabboo-ratnanis.html
http://cinemaleak.blogspot.com/2012/01/katrina-kaif-louis-vuitton-fall.html
http://cinemaleak.blogspot.com/2012/01/esha-gupta-top-less-on-femina-issue.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/priya-new-hot-and-cute-pics-latest.html
http://cinemaleak.blogspot.com/2012/01/topless-hot-pics-of-gabriella-fhm.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/aishwarya-priyanka-in-dabboo-ratnani.html
http://cinemaleak.blogspot.com/2012/01/malaika-arora-at-launch-of-sunsilk.html
http://cinemaleak.blogspot.com/2012/01/diya-mirza-at-filmfare-nominations-bash.html
http://cinemaleak.blogspot.com/2012/01/bipasha-basu-in-dabboo-ratnanis.html
http://cinemaleak.blogspot.com/2012/01/katrina-kaif-louis-vuitton-fall.html
http://cinemaleak.blogspot.com/2012/01/esha-gupta-top-less-on-femina-issue.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/priya-new-hot-and-cute-pics-latest.html
http://cinemaleak.blogspot.com/2012/01/topless-hot-pics-of-gabriella-fhm.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/aishwarya-priyanka-in-dabboo-ratnani.html
http://cinemaleak.blogspot.com/2012/01/malaika-arora-at-launch-of-sunsilk.html
http://cinemaleak.blogspot.com/2012/01/diya-mirza-at-filmfare-nominations-bash.html
http://cinemaleak.blogspot.com/2012/01/bipasha-basu-in-dabboo-ratnanis.html
http://cinemaleak.blogspot.com/2012/01/katrina-kaif-louis-vuitton-fall.html
http://cinemaleak.blogspot.com/2012/01/esha-gupta-top-less-on-femina-issue.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/priya-new-hot-and-cute-pics-latest.html
http://cinemaleak.blogspot.com/2012/01/topless-hot-pics-of-gabriella-fhm.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/aishwarya-priyanka-in-dabboo-ratnani.html
http://cinemaleak.blogspot.com/2012/01/malaika-arora-at-launch-of-sunsilk.html
http://cinemaleak.blogspot.com/2012/01/diya-mirza-at-filmfare-nominations-bash.html
http://cinemaleak.blogspot.com/2012/01/bipasha-basu-in-dabboo-ratnanis.html
http://cinemaleak.blogspot.com/2012/01/katrina-kaif-louis-vuitton-fall.html
http://cinemaleak.blogspot.com/2012/01/esha-gupta-top-less-on-femina-issue.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/priya-new-hot-and-cute-pics-latest.html
http://cinemaleak.blogspot.com/2012/01/topless-hot-pics-of-gabriella-fhm.html
http://cinemaleak.blogspot.com/2012/01/topless-sunny-leone-in-saree.html
http://cinemaleak.blogspot.com/2012/01/aishwarya-priyanka-in-dabboo-ratnani.html
http://cinemaleak.blogspot.com/2012/01/malaika-arora-at-launch-of-sunsilk.html
http://cinemaleak.blogspot.com/2012/01/diya-mirza-at-filmfare-nominations-bash.html
http://cinemaleak.blogspot.com/2012/01/bipasha-basu-in-dabboo-ratnanis.html
http://cinemaleak.blogspot.com/2012/01/katrina-kaif-louis-vuitton-fall.html
http://cinemaleak.blogspot.com/2012/01/esha-gupta-top-less-on-femina-issue.html

japarus shadiq on 8:01 AM, February 06, 2012 said... #

thank i like it

sauleh on 5:09 PM, March 13, 2012 said... #

novelsandmovies.blogspot.com

lordzden on 6:58 PM, March 16, 2012 said... #

Thank you for your tutorial, I have added it to my blog but what was show is the tweeter button only, no facebook button, i guess fb does not support this any more pls update. thanks.

Regards,
Top 10 tourist Spots in the Philippines

Nihit Dalmia on 3:51 AM, March 22, 2012 said... #

Thanks Mohd.. I have applied it to my blog but tweaked it & it gives excellent result. Also, provided with complete graphical presentation "How to DIY". I have also solved the problem of not having Like Page ID. Have a look at my Blog & let me know what do you think of the same.

http://www.yourbloggingtips.com/2012/03/facebook-like-box-widget-for-blogger.html

rht on 2:25 PM, April 06, 2012 said... #

hello this my comment On this blog.Mashable tricks

Reginald Chan on 11:45 PM, April 15, 2012 said... #

Thank you! It is working for my blog right now. Been looking for this for sometime now. Is there anyway to have additional one button which is for Google+ like?

Here's my blog http://bigfatreality.blogspot.com

Confused? Feel free to ask

Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.

Note:
1. To add HTML CODE in comments then please use our HTML Encoder
2. You can always Test the tutorial on our HTML Editor
3. Please do not spam Spam comments will be deleted immediately upon our review.

Regards,
Mohammad

 

Recent Posts

Join Me On Facebook

8600+ Followers

Join The Team!

Licensed Under CC

Recent Comments

Follow Me On Twitter

2601+ Followers

My Blogger Tricks (MBT) © 2012. All Rights Reserved | Contact |