Adding floating social media sharing buttons
As promised to some of my readers, here’s a tutorial on how to add a floating social media bar to a blog. I made it into a widget, so you don’t have to go into your template HTML to install (or remove) them. Just drop the whole code into a HTML/Javascript gadget.
I have included Facebook Share Like, Retweet, StumbleUpon, Google Buzz, Digg This and Google+1 buttons in the bar and each of them comes with a live counter. You can add more social bookmarking or sharing buttons later if you wish.
I. Adding the buttons
- Adding to Blogger
- Go to Layout (old interface: Design > Page Elements).
- Click Add A Gadget.
- In Add A Gadget window, select HTML/Javascript .
- Copy the code below and paste it inside the content box.
- Save the gadget.
- Drag the gadget and reposition it under Blog Posts gadget.
- Click Save button (top right hand corner).
- Adding to WordPress
- Go to Dashboard > Appearance > Widgets > Available Widgets.
- Drag Text widget into a sidebar.
- Paste in the code.
- Save.
<!-- floating share bar Start bloggersentral.com--> <style type="text/css"> #pageshare {position:fixed; bottom:15%; margin-left:-71px; float:left; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;padding:0 0 2px 0;z-index:10;} #pageshare .sbutton {float:left;clear:both;/*bs-fsmsb*/margin:5px 5px 0 5px;} </style> <div id='pageshare' title="Get this from BloggerSentral.com"> <div class='sbutton' id='like' style='margin-left:8px;'> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-send="false" data-layout="box_count" data-width="40" data-show-faces="false"></div> </div> <div class='sbutton' id='rt'> <script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script> </div> <div class='sbutton' id='su'> <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script> </div> <div class='sbutton' id='digg' style='margin-left:3px;width:48px'> <script src='http://widgets.digg.com/buttons.js' type='text/javascript'></script> <a class="DiggThisButton DiggMedium"></a> </div> <div class='sbutton' id='gplusone'> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <g:plusone size="tall"></g:plusone> </div> <div style="clear: both;font-size: 9px;text-align:center;">Get <a href="http://www.bloggersentral.com/">widget</a></div><!-- Do not remove this link --> </div> <!-- floating share bar End -->
Updates
July 2012: Remove Facebook Share button and related CSS, and replace it with Like button. You can refer to the old code below.
Oct 2011: Add instructions for WordPress.
July 2011: Remove Google Buzz button. Who needs Buzz when you have Google +1?
July 2010: Add Digg This button. June 2011: Add Google +1 button.
The old code (for reference only, do not copy). Comments 1 to 375 refer to this code:
<!-- floating share bar Start bloggersentral.com--> <style type="text/css"> #pageshare {position:fixed; bottom:15%; margin-left:-71px; float:left; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;padding:0 0 2px 0;z-index:10;} #pageshare .sbutton {float:left;clear:both;margin:5px 5px 0 5px;} .fb_share_count_top {width:48px !important;} .fb_share_count_top, .fb_share_count_inner {-moz-border-radius:3px;-webkit-border-radius:3px;} .FBConnectButton_Small, .FBConnectButton_RTL_Small {width:49px !important; -moz-border-radius:3px;/*bs-fsmsb*/-webkit-border-radius:3px;} .FBConnectButton_Small .FBConnectButton_Text {padding:2px 2px 3px !important;-moz-border-radius:3px;-webkit-border-radius:3px;font-size:8px;} </style> <div id='pageshare' title="Get this from BloggerSentral.com"> <div class='sbutton' id='fb'> <a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> </div> <div class='sbutton' id='rt'> <script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script> </div> <div class='sbutton' id='su'> <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script> </div> <div class='sbutton' id='digg' style='margin-left:3px;width:48px'> <script src='http://widgets.digg.com/buttons.js' type='text/javascript'></script> <a class="DiggThisButton DiggMedium"></a> </div> <div class='sbutton' id='gplusone'> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <g:plusone size="tall"></g:plusone> </div> <div style="clear: both;font-size: 9px;text-align:center;">Get <a href="http://www.bloggersentral.com/">widget</a></div><!-- Do not remove this link --> </div> <!-- floating share bar End -->
II. Customizing
- Vertical alignment
Change the value ofbottom
in code line 3. The code positions the button relative to the bottom of your browser window. To fix the distance even when window is resized, specify the value in px (pixels) instead of %.
- Horizontal alignment
Change the value ofmargin-left
in code line 3. Negative value pushes the button to the left of the main blog column, positive value pushes it to the right.
To position the button relative to the left or right edge of browser window, replace themargin-left
withleft
(as inleft:10px;
) orright
(as inright:10px;
) respectively.
- Replacing and removing buttons
You can replace existing buttons with your own. Each button is represented by this code:<div class='sbutton'> BUTTON CODE </div>
To replace the button, simply replace the button code with the new code.
To remove the button, delete the whole div.
Update (for Blogger): If somehow your Google +1 button doesn’t appear despite other buttons appear successfully, try this workaround:
- Go to Template > Edit HTML (old interface: Design > Edit HTML) and find this line:
<body expr:class='"loading" + data:blog.mobileClass'>
or<body>
- Copy the share bar code and paste it right below the line.
- Replace the
margin-left:-71px;
in code line 3 withleft:10px;
. - Preview before saving.
Enjoy!
399 comments to "Adding floating social media sharing buttons"
«Oldest ‹Older 201 – 399 of 399 Newer› Newest»Thank you so much it worked.
Hi, I think the sidebar is excellent. I am having problems with adding a google +1 to it. http://cullensclearances.blogspot.com
As you can see I have no google +1...can anyone help?
@Cullens Team
Have you read the update at the bottom of the post?
hi, very helpful. thank you!
I want to add the official twitter tweet button and not the tweetmeme, and have followed your posts 42 and 84. It works, but... the tweet button is slightly larger than the rest! How do I make it so my buttons look exacly like your widget currently showing to the left of this msg? I want to have only FB share, Twitter Tweet, and Google+ but all the same size ?
Thanks!!
I also see in your reply 168 that you can't resize the twitter button... but can you resize the FB and Google+ buttons? Your buttons all seem to be the exact same size, how do I make mine look exactly like yours?
okay I figured out how to change the FB share page size... but how do I now change the Google+ size to make it the same size as the Twitter Tweet button (not tweetmeme button)? Thanks!!
I found it green lava why google +1 buttom is not shown.It is because we should cannot install tow+1
hi, sorry for all the msg's. I have figured out how to change the size of +1 and FB, but now i see a slight issue. the buttons are positioned perfectly on my mac, but when i open the website on a larger/smaller screen, the button's position changes. is there a way to 'lock' the buttons so it's at the same spot on the screen no matter what the size of the screen is? Thanks!!
The Facebook share count box has disappeared from mine for some reason? Help?
Is it just me, or is the Facebook counter not working anymore?
if using that to wordpress how ..????
how to insert this bar at the right side of widget area ? i have sliding menu at the left hand side of my blog, hence i wish to remove this social button bar to the right side.
www.omkarfarm.com
Awesome little piece of code you've developed here.
If I wanted to add a Tumblr button - do you know the location of a script that I could use?
@Jelly Gamat
Put the code in a text widget.
@Picnic Resort
Use a positive value for margin-left property in line 3.
Try 920px.
@Conor O'Brien
@Liz
Mine disappeared too. I guess Facebook is pulling the plug on Share button. I'm going to wait for a couple more days, before replacing it with a Like button-counter.
if i changed it to 920px.....it disappeares. ;-(
Hey Green Lava How do i to number share above share buttom of that widget
@Picnic Resort
Experiment with different values til you get the right one.
@Shirshak Bajgain
Read reply #220.
for the first time..i love this blog. usefull to me. thank's bro.
thanks for this cool widget. but I didnt get on adding the 1+ button. is it because i already add the button on every entry?
p/s: I've reviewed your weblog here:pyejal.theStory
@pyejal
Have you tried the workaround (in the update at the end of the post)?
Hi dude, great blog, I really want to replace the Share button with a Like button (number box style) but I'm not having any luck...any suggestions?
Thank you for this awesome buttons code :)
@TheKrow
Please read reply #202.
Awesome widget!! ><
Btw I was wondering if I want to place the css before the [/b:skin] in the template instead of putting it inside the widget section, is there a possible way to do that?
Because after I directly copy-paste the css code before the [/b:skin], the widget won't float. It stucks in the bottom of my page...
Thanks for your help, Greenlava!
@Vika F. Insanittaqwa
Assalamualaikum,
You have to remove [style type="text/css"] and [/style] tags when placing the code in the style sheet (ie. before /b:skin).
Thanks a lot!
Hi Greenlava! I just wanna ask if is it possible for me to make the background of this widget "transparent" instead of white? Thanks! :)
thank you very much............
Awwww! Never mind. It okay now.. Thanks. :)
This is GREAT! How do you get yours to stay connected to content area of the page as opposed to floating on the left side of the page?
Thanks so much!!!
@Mark Horoszowski
First, I'm going to assume you've tried putting the code inside a widget. It it didn't work, that why you put it direct in HTML.
Okay, to make it stick to the content area you need to place the code inside the content area. Try placing it right after
[div class="content-outer">]
line and adjust margin-right to position it.
This is epic, you should keep posting scripts that work this well! Can you show us how to add buttons like Delicious and Facebook Like?
By far the easiest way I've found, thanks! The code is running on my blog as we speak. I would like to add a Tweet button to each post separately as well, any help with that? I mean the floater Tweet for my entire page and a Tweet in posts just for that particular post. Thanks if you can help.
@BenRacicot
For Like button, read reply #202. Sorry can't help you on Delicious button.
@Eric
Go here: Add Twitter tweet button to Blogger posts
why are the buttons overlapping?
http://www.educationgis.com/2011/08/crime-mapping-app-on-your-iphone.html
how to add the twitter at upper right "get free update" column ???
Great little piece of code. You legend.
However I cannot quite get a space between the facebook and tweet buttons as you can see on my blog. I have tried adding padding but probably not adding it in the right spot. Hmmm I tried to switch the two around but no luck so reverted it back. I know I cannot resize the tweet button but I cannot seem to resize the other buttons either, well not stumbleupon anyway.
http://fourjandals.blogspot.com/
Thanks
Thank you for widget!
But I have some trouble. I can't do the same width for buttons. I use the same buttons like in your blog, but I've changed "share" to "like" button. I couldn't use even div align="center" tags But it will be better if you'll help with width. Can you help me?
Thank you!
@GIS Ed
You have this code in your CSS:
.sbutton {
margin-right:10px;
float: right;
margin-top: 0px;
background: #167498;
border: none;
font: bold 100% "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #FFFFFF;
height:24px;
line-height:24px;
}
that's interfering with the floating sharebar "sbutton".
What you can do is change floating sharebar's "sbutton" with a different class name e.g. "sharebutton". You want to change it in all 6 lines -line 4, 11, 14, 17, 20 and 24.
@FourJandals
You should've added the Tweet button into a separate sbutton div, as explained in II.3.
Of all the buttons, you can only resize the FB button.
Thanks dud ;D Just one problem with it, there on top of other gadgets, so how can I fix that? look http://internetygaming.blogspot.com/....I'm spanish so my english is horrible, hope u can help me
Facebook button likes odd...
http://bit.ly/qIGeiv
which HTML/Javascript shall we select there in the box and where to paste it
@Greenlava
Is there any way to have the buttons stay in the same position on my blog, so that it does not follow me when I scroll. I want to put the buttons beside my header/logo.
@Conor O'Brien
Remove position:fixed; in line 3.
hai green lava.nak minta tolg sikit..saya mengalami masalah dengan FB share & like button.code ini muncul apabila menekan FB share button.. tag. --> if (window.jstiming) window.jstiming.load.tick('headEnd'); manakala code berikut pla muncul pada like button
tag. --> (function(){var a;var b=navigator.userAgent;a=b.indexOf("Mobile")!=-1&&b.indexOf("WebKit")!=-1&&b.indexOf("iPad")==-1?!0:b.indexOf("Opera Mini")!=-1?!0:!1;if(a){var c;a:{var d=window.location.href,e=d.split("?");switch(e.length){case 1:c=d+"?m=1";break a;case 2:c=e[1].search("(^|&)m=")>=0?… please help me to fix this..utk gambaran sebenar,please visit my blog @ http://tekok-beriuh.blogspot.com thanks in advanced bro
How do I add email sharing button that can use yahoo, gmail, or other email client?
Anto.
it benefit for me, thanks.
@Hardy_Hunt2
Look for this line in your CSS:
#Step 3. Copy below code and paste it just before the [/head] tag. [/script]
It doesn't belong in there. You need to remove it.
This share bar looks good! Thanks for share this share bar!
Something easy to install. Thanks for sharing! :)
Superb!! Works very well.
how to resize original twitter button to fit with other buttons in width ... visit fordinsider.com to See 4 your self ... its bulging :S
@ford insider
I'm afraid you can't resize Twitter button.
Thanks and I like it and use it on my blogs
Finally, I just found what I've been looking for. I've been searching for this widget for a week. And I came here via Google. Thanks for this great tutorial. Keep rockin'!
superb thanx :)
Hi. Could you pls add an email button to this? Thx!
tnx man..it helps my blog..
http://sephglee.blogspot.com..
I will definitely bookmark your blog!!!
thanks you so much for this widget ..! i have done ..!
@Mehrin
Please read reply #123.
Greenlava, you are the man, this is so sickly awesome! Thanks!
admin...macam mana ye kalau nak bagi center dia punya location antara atas dan bawah tu...kalau refer dlm ni, 'Change the value of bottom' tu.saya dah buat.memang jadi tapi kalau buka kat komputer office, mende tu jadi macam ke bawah lak.macam button dalam ni, saya bukak kat laptop sendiri and laptop office, dia punya vertical positin still same....macam mana tu...boleh tolong tak...?
http://kongsakongsi.blogspot.com/
hello,
As I have read the blog above, I was glad because the installment was great. Hope to see more likely this one.
@APAN
Pastikan guna nilai dalam %. Nak betul-betul center (untuk semua skrin) susah sikit sbb takde CSS yang boleh buat camtu. Cuba ubah nilai tu, dapatkan yang terbaik.
@Pinoy Video
Digg button is there already.
oh...mcm tu ke...tq admin... :)
Hey I am new to blog I just have added this to my blog but as I added this it made my facebook like box disappear My blog is here:
http://computer-world-of-knowledge.blogspot.com/
Google Plus One button worked for me before, then it suddenly disappeared. I've tried the method in your Update, but it doesn't work. I've found out that, if I add an AddThis widget (including Google Plus One button), then the button would reappear in your widget... do you know why? And how can I fix? I'd rather use your widget without AddThis, thanks.
Thank you so much for this. Now my social media share buttons are floating on my blog. I only wonder why the code you gave is not the same as it appears here on your blog. I want the tweet button you have and not the retweet. perhaps I have to research for this.
Thanks a lot anyway! This post is such a great help. Cheers!:-)
@Nonoy
I've answered that question before. The answer lies in the comments somewhere.
Thanks a lot for this - I love it. Would also love to have something like this on the mobile version of the Simple Blogger template that I'm using on elspethevans.blogspot.com. Any advice on how to do this?
is it possible to add on my wordpress site? i hope you can make 1 for wp :(
http://www.cheatanarchy.com mine doesnt look good
@ryan
You can use the same code for WordPress too.
1. Go to Dashboard > Appearance > Widgets > Available Widgets.
2. Drag Text widget into a sidebar.
3. Paste in the code.
4. Save
If this is actually your code, Good Job! (Y)
can I have the same code as you do? It defines perfection!
Thank you!!!
thanks!
thanks for this awesome gadget, but how can I close this?, Can you add a close button for this.
bro, merujuk pd komen post 84
Add this immediately after line 10:
[center][p style="font-family: tahoma,arial; font-size: 12px; width: 55px; margin: 0pt;">Pls share this page[/p][/center]
Make sure you replace [ with < and ] with > when adding the code.
[ with < and ] ni apa? aku cr xda pon mcm ne nk replace
sorry ak noob cket sal html
Greenlava. Thanks for sharing. Im intresting with this. thanks thanks.
@nine
Kod sebenar menggunakan simbol "<" dan ">" sebagai bracket. Tapi saya tak boleh letakkan bracket tersebut dalam ruang komen sebab ia akan di render oleh Blogger. Sebab tu saya terpaksa gunakan "[" dan "]" di dalam kotak komen.
Contoh:
Kalau saya nak letak kod untuk bold text, saya terpaksa tulis macam ni:
[i]Tulisan italic di sini[/i]
Kalau saya guna actual kod, ia akan jadi macam ni:
Tulisan italic di sini -tak nampak kod, cuma nampak hasilnya
@shah Blogger
You're welcome :)
Thanks for sharing..
Hi there :)
I came here looking for exactly one floating shares. You say that this can be used even in normal web pages: how should I do to have it in my pages and especially as I have it on the left instead of right.
Thank you very much
Lio
Brother I want exactly the same as you have in ur blog 1.e: G+, FB like, FB share, and Tweeter
Please help me to get eh code. The above mention code display something else
Regards
Passionate Writers
This button is beautiful. Thanks for sharing the code.
This is great thanks for sharing,Ive added a linkdin button but is a bit wider than the rest... how can I modify this
www.tricitypsychology.com/shrinkrap
Thanks for code. Its amazing
@kathyjames
I don't think you can modify LinkedIn button. If I'm not mistaken, the button is made up of fixed-size background images.
@Passionate Writers
Here's the code for the Like button:
[div class='sbutton' id='like' style='margin: 5px 0 0 5px;']
[script src='http://connect.facebook.net/en_US/all.js#xfbml=1'][/script]
[fb:like layout='box_count' show_faces='false'][/fb:like]
[/div]
and the official Tweet button:
[div class='sbutton']
[a class='twitter-share-button' data-count='vertical' data-via='BloggerSentral' expr:data-counturl='data:blog.url' href='http://twitter.com/share' rel='nofollow'>Tweet[/a][script src='http://platform.twitter.com/widgets.js'
type='text/javascript'][/script]
[/div]
Thanks for sharing this tutorial.
It really works.
Sir, I want the code exactly the same as you have, Google share.Facebook Like button, Share button and tweet .. Can I have 1 ? MrFendy00@Ymail.Com Thanks sir .. ( Sory for my bad english )
@Unavailable
Please refer to reply #298 for the Like and official Tweet buttons. All you need to do is rearrange the codes to get the order you want.
Hi, I found this code interesting. I was thinking if the same feature(floating feature) can be made by using a custom image I made which links to my FB page. Any tips?
@animebodega
Your code:
[div class='sbutton' id='myfbpage']
[a href="PUT YOUR FB PAGE'S URL HERE"][img src="PUT YOU CUSTOM IMAGE'S URL HERE"/][/a]
[/div]
i want to set it right side to my blog
@Gaurav Bansal
Change the value of margin-left in line 3 to a higher (positive) value.
Thanks for a pure code suggestion.
it worked after half an hour, amazing! thank you for a wonderful site!
GreenLave, I implemented this and it worked superbly for a few days. then FB decided to do some changes and now you cannot share on FB from blogger (you can check the Blogger Help Forum for news on this). how do I change the FB share button to the Like one?
@Seta Tutundjian
Replace code line 12 with this Like button code:
[script src='http://connect.facebook.net/en_US/all.js#xfbml=1'][/script]
[fb:like layout='box_count' show_faces='false'][/fb:like]
Good tutorial.
thanks a lot! i've been finding ways to do this and now i did it thanks to you :)
How do you put this sidebar on the right side of the page? PLZ reply!!!!
@Natalie Perez
I've replied on Facebook
i love it. thanks brothers :*
How do I make the bar look just like the one you have on the left? I want the facebook like button, and the regular tweet button, not the green one. Thanks.
@Anonymous
I posted the Like and official Tweet buttons codes in reply #298.
I must be the most illiterate person when it comes to adding code to this- but I have tried adding the code from replies 24 & 140 in this thread to the widget to get my twitter name to come up, but I keep getting errors. I'm adding it to the lines it says to, but I have a feeling I'm using the symbols [ ] where I should be using < >. I know most smart computer people would know where to substitute these, but I don't. Is there and explanation for this that a stupid person might be able to figure out?
I love this widget and would love to use it, but if it doesn't tweet my username, I can't. Thanks so much. Brilliant widget.
Thanks Dear , For the sharing this tutorial, its working fine on my blogs.
Woah! Thanks for providing us with the codes needed to get the widget. That is awesome.
The plug in looks great. Placement is a little high in IE, but when I tried to make it fixed it still looked weird so I decided to let it go for now.
How do I add Pinterest to this? A lot of my followers are teachers and really into pinning things right now.
@Anara from able2able
Here's the code for Pinterest's Pin It button:
[a href="http://pinterest.com/pin/create/button/" class="pin-it-button" count-layout="vertical"]Pin It[/a]
[script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"][/script]
Please read previous replies to learn how to add it to the bar.
@Greenlava: Thanks for adding the codes for the Facebook like and official Tweet button. It works great, except for the tweet button that's a little too large...
Could you tell me where I could change its width please? Thanks!
Hi, i was scrolling through the comments, but i didn't found any topic about facebook send button, i would like to add it to the swirlingfloating bar, hehe
but this one doesn't work
[b:if cond='data:blog.pageType == "item"']
[script src='http://connect.facebook.net/en_US/all.js#xfbml=1'/][fb:send colorscheme='light' expr:href='data:post.url' font='arial'/] [/script]
[/b:if]
what do you think?
@Mathilde
Sorry, but you can't change the width. You can't apply CSS to Tweet button because it sits in an iframe (of a different domain).
@Zakkiy ibnu bahrun
Get the Send button code from this post: How to add Facebook Send button to every post
love it, thanks ...
its good.
I want to add twitter button instead of tweetmeme and fblike instead of fbshare.
@Blogger
Read reply #140.
When someone clicks to retweet a post the URL is long and often takes up most of the tweet. Is it possible to convert & shorten the link via a URL shortening site?
Hi, somehow the plus one button is not showing on my blogger classic template...and your blogger update is not clear ,by stating I.5 do you mean section I line 05 which relates to :.fb_share_count_top {width:48px !important;}
I want to add fblike button instead of fbshare.
@Nairobian Perspective
I can see the Google+1 button just fine.
Thanks pointing out the mistake. I fixed it, now it reads "Copy the share bar code and paste it right below the line"
@Rahul Dixit
I've discussed that before. Please browse/search the comments.
@GC
Yes you can shorten the URL. Just insert this line before the TweetMeme Javascript call (before line 15):
[script type="text/javascript"]
tweetmeme_service = 'bit.ly';
[/script]
That's for bit.ly URL shortener. Visit this page for the list of applicable shortener services:
http://help.tweetmeme.com/2009/08/17/url-shorteners/
@Greenlava
I'm actually using the official twitter button you mentioned in reply #298 so I'm assuming that tweetmeme line won't work with it?
@GC
No that wouldn't work with the official Tweet button.
Having said that you won't be needing a URL shortener for Twitter Tweet button, because it shortens URLs automatically, using Twitter's own t.co URL shortener.
@Greenlava
Cool! Thats good to know, thanks for all the help Greenlava!
Nice media buttons! Thanks a lot author.
@Don Mashak
Try this: Align Google +1, Tweet, Like and Pin It buttons horizontally
Awesome widget , thanx a lot !
Is there a way to add a pin it button with a tracker to this side widget? This has been the BEST tutorial ever by the way.
jessica@mystylevita.com
I've been using this for a year or more now and it's been great, but then it stopped counting. It doesn't keep track of sharing anymore. Sometimes StumbleUpon works for a bit but the rest all drop their count.
Any advice?
Is there a way to direct code this into the html? I saw your earlier comment about adding after the content-outer but that didn't work for me.
The reason I want to code it directly in is because I can't remove the borders of the widget in IE. They go away in FF, but they still display in IE so I get an empty box after the post and above the footer.
I also tried moving the widget to the footer since there are no borders on those widgets, but then it was stuck to the bottom of the page in IE. (Again, worked fine in FF -- so frustrating!)
Did anyone get the Pinterest button with the counter to work in this gadget?
@Greenlava, I tried the code you posted for an earlier commenter but it just showed up as a text link for me with no icon or counter...
Just realized the widget is not working in IE8 for me...it shows up and the counters are all correct but you can't click on anything to share the page...
@Greenlava, any ideas?
Thanks for this post...you have saved a life today.
i am using your gadget it is good can you add linkdin to this gadget
thank you
@umesh
Here's the code for LinkedIn:
<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-counter="top"></script>
Thanks for giving all this help its much appretiated
I am just having trouble with Twitter codes I would love the coding for the tweet with the count above
This is for a Wordpress homepage.. Whatever I enter does not work
Bob
this works fine but other fb plug ins (like, comment box, like box) were affected and not working. so i have to remove your widget. Its weird but did this happen to anyone?
thanks brother i worked god bless you!
@Bob
Try this code:
[div class='sbutton']
[a class='twitter-share-button' data-count='vertical' data-via='BloggerSentral' href='http://twitter.com/share' rel='nofollow'>Tweet[/a][script src='http://platform.twitter.com/widgets.js' type='text/javascript'][/script]
[/div]
replace BloggerSentral with your own Twitter username.
it's really awesome..thanks..
nice tips.floating share button has a way of attracting visitors to click and share your post.
Thanks Great found by a friend and shared with me
I love this element! I am trying to add the Pinterest "Pin It" function and am having difficulty... can anyone help?
the share button is not showing counter pls help me pls pls pls pls pls pls pls pls pls pls pls pls i am searching for 1 week
thanks for sharing this , so nice post thanks for widget,
@Mohamed Musthafa
Counter will appear once the count reaches 3.
Aye man, great code! Better than any share bar plugin at least for wordpress
I'm using Picture Window theme and this widget is not aligning properly. Please check the URL: www.softlexicon.com and suggest the fix. Thank you in advance.
Hi Greenlava,
Thank you for another awesome feature!
I've added the Pin it button as recommended in post no. 321. It showed 'Pin It' only, no button. Went to the Pinterest site and copied some code from there. Now I have the button but it's a bit too small and it doesn't show the counter.
As I'm not good at html at all, I'm completely helpless now.
The code in my widget for this part is
[div class='sbutton' id='Pin It']
[a href="http://pinterest.com/pin/create/button/" class="pin-it-button" count-layout="vertical"][img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /][/a]
[script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"][/script]
[/div]
Of course with <> instead of [] ;-)
Any idea? My blog is www.katzentisch.com (other buttons removed on purpose)
Thanks a lot in advance,
Molly
@Molly
Try replacing it with this one:
<div class='sbutton' id='PinIt' style='margin-left:8px;'>
<a class='pin-it-button' count-layout='vertical' expr:href='"http://pinterest.com/pin/create/button/?url=" + data:post.url'>Pin It</a>
<a href='javascript:void(run_pinmarklet())' style='margin-left:-46px; width:43px; height:20px; display:inline-block;'/>
<script src='http://assets.pinterest.com/js/pinit.js' type='text/javascript'/>
<script type='text/javascript'>
function run_pinmarklet() {
var e=document.createElement('script');
e.setAttribute('type','text/javascript');
e.setAttribute('charset','UTF-8');
e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r=' + Math.random()*99999999);
document.body.appendChild(e);
}
</script>
</div>
and tell me if it works.
Greenlava,
Sorry, no, it doesn't work. Again there was the text 'Pin it' only. I've replaced it with my version again.
Nevertheless, thank you for trying! If you have another idea, please let me know :-)
Molly
Thanks for this article this plugin helper for blogger
@Molly
I forgot to tell you, the code in #365 won't work if you install the floating social media using HTML/Javascript gadget.
It will only work if you install it via Template > Edit HTML as explained under "Update (for Blogger)".
thanks dud, ,.now, i can make it well...
Thanks to you
thnx for sharing this tutorial. great work
Hi,
I was using this widget...recently I have seen that the FB share button is not showing on my blog http://www.askqtp.com/
Only share a hyperlink is coming...
Please help.
Regards,
Animesh
What's wrong with Facebook Like Buton. Button is indented to the right.
My facebook widget is looking strange. It has the word "share" next to the widget. Any ideas what the problem is?
Greenlava, thank you for updating and replying to comments in this post. It's been very helpful!
I tried the Pinterest code you provided and am having the same problem as the gentleman in comments 345 & 346 - the line of Pinterest code is appearing in my buttons instead of the Pinterest icon. is it because there is no id in the code but there is in all the others?
I have a sudden new problem: My Facebook button has shifted to the right and the text "share" is now appearing in the floating bar. The only change I have made to my blog is adding rafflecopter as an embedded link in one post.
My code is now in the html - very neatly solved the g+ button problem as you described above and also shifted the floating bar further to the left, which I like. This was done after the problem with the Facebook icon started and did not affect that problem either way.
www.able2able.com
@Aleksander, Tracy Simmons, Anara
I've updated the code, replacing Facebook Share with Like button. It seems Share button no longer works, since mid July.
brillant piece of information, I had come to know about your web-page from my friend hardkik, chennai,i have read atleast 9 posts of yours by now, and let me tell you, your webpage gives the best and the most interesting information
This is great, thank you! I always thought it was a Wordpress app and didn't know how people got the floating share buttons. I actually came across your blog while looking for the add me buttons (like the ones you would see in a line on the top of a blog) and this is just too cool! I just added it to my blog.
woah! helpfull but these codes are really confusing.! i need to get more used to them first! :(
Can You add Pinterest button?
@ARBAL
See reply #365.
good code
Great work GreenLava, please i would love to know if there is any available tutorials that can be applied to make facebook like button, twitter tweet button, and facebook comment box to appear on blogger mobile view. They are all visible on the desktop view.
Your reply would go a long way.Thanks
http://gistland.com
thanks for ur nice info
adding floating media brings you that extra style
The Tweetmeme button is not showing up in my widget. I think I copied and pasted the code correctly. Is there anything else I may have done wrong?
awesome, thanks for the tutorial. i'm now using it on my blog :)
I pretty much agree with you mate! using a code is always better rather than using plugins, if there are host restrictions then your definitely running into problem. anyways thanks for the great tutorial man
What related post do you use in bloggersentral ? Pls help me sir.
@Durai Sankar
I use nRelate. Just type "nrelate" in the search box for the tutorial.
Good post, thanks for that. i am going to add this to my site.
Hello, thanks for the tutorial, but what exactly is the code to display only: facebook, tweeter and google +?
Thank's
Awesome.. finding this one... your site is awesome
this post helps me to apply on my blog. Thank you
If you like wordpress, I suggest trying Digg Digg which is another plugin that adds floating social media icons
The Twitter button does not appear in my website. :( How can I do that. Also, do you have any social media code for sharing below the post? Thanks.
This is the best widget for social media sharing. thanx
Although this post is years old, it helped me so much! Thank you for giving such wonderful advice for something I've been looking for for so long!!!
hi Greenlava...I was searching to integrate social media button vertically (moveable)to my mobile app development blog http://mobileappstuff.blogspot.com/. I read many articles but found this article very useful. In this article the method you have mentioned is very easy and simple.
One thing I want to know how to add Linkdin button in list.
I have shared this to article to recommend others and further use.
Thanks for sharing such great article.
@Sophina Dillard
To add a LinkedIn buttonAdd this code after line 31:
<div class='sbutton' id='linkedin'>
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-counter="top"></script>
</div>
installing plugins is best but i still prefer using codes since you know what to change! plugins make your site speed slower
Man, you really rule
Thanks a lot
does the floating bar load asynchronously or is it blocking?
@David Snape
The FB Like script is asynchronous, while others are regular scripts.
Great code, kudos Greenlava for keeping up for this long. Is it possible to change the facebook count to be connected to a specific targeted facebook page instead of the url of which the buttons are posted? in my case the facebook page for the site has 12,000+ likes but the actual url of the site only has about 500+, i'm assuming it's replacing something in line 12....
@Anonymous
It's line 16, try replace it with this:
<div class="fb-like" data-send="false" data-layout="box_count" data-width="40" data-show-faces="false" data-href="Put your FB page url here"></div>
yr a lifesaver Greenlava
I used a floating share bar from your site but am trying to remove it due to site updates. I was looking for the html coding so that I could search it in my template and erase it, but the html on this post doesn't match anything I have in my template. The widget links directly to your site, so I'm positive this is where I got it, and I didn't find any other posts that might have been the one. Did you used to have another floating share bar post, somewhere?
@Kirstyn
I only see the Pinterest hover button in your template.
Comments on this post are closed.