Adding official Twitter follow button to Blogger
Make it easier for your blog visitors to follow you on Twitter by adding Twitter Follow button to your blog.
The Twitter Follow Button lets them follow you straight from your blog, without having to visit Twitter. All it takes is just one click (if they are logged in).
The button comes with (optional) followers count. Visitors can also see your profile and latest tweets by clicking the button.
Let us proceed with the tutorial:
- Go to
Design > Page ElementsDashboard > Layout . - Click Add A Gadget and select HTML/Javascript gadget.
- Copy the code below and paste it inside the content box:
<!-- Twitter follow button start --> <a href="http://twitter.com/USERNAME" class="twitter-follow-button">Follow @USERNAME</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> <!-- Twitter follow button end -->
- Replace USERNAME with your Twitter handle (username).
- If you’re already using a Tweet Button on your blog, you won’t need the Twitter widget Javascript (code line 3). Remove it.
- Configure button
You can configure the look of the Follow button by adding link data-attributes (next to
class="twitter-follow-button"
) in line 2. Refer to the list below:Description Appearance Data-attribute Default Don’t show followers count data-show-count="false"
Don’t show Twitter handle data-show-screen-name="false"
Large button (shown here without count) data-size="large
"
Align button to the right data-align="right"
- Save the widget and view your blog.
- Do test the button to make sure if it works.
Here’s a live demo example:
and the code for it:<!-- Twitter follow button start --> <a class="twitter-follow-button" href="http://twitter.com/BloggerSentral" data-show-screen-name="false" data-size="large">Follow @BloggerSentral</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> <!-- Twitter follow button end -->
Enjoy!
Update Jan 2012: Update code and attributes, and add demo.
45 comments to "Adding official Twitter follow button to Blogger"
wohoooo... must try this button
thanks BS
For some reason it doesn't work for my blog. It messes with how my blog looks. Something about the code.
@Blog This Link
You're right about the code...thanks for bringing it to my attention.
I've fixed it though. You can retry now.
Thanks.. I ve put this on my blog and It works. I ve been searching for this type of button.
Click here to watch live on my blog
thanks for a nice post.i am try it and done.
Thanks for this button.
is there a way to make the followers be underneath the follow twitter sign? my followers number is cut off on the edge?
@NYC, Style and a little Cannoli
I'm afraid you can't. The only option now is to widen the sidebar, or remove the followers count.
how about page load? it's effect page load or not?
salam..
very nice entri
very useful
:)
@nizam
Of course it puts additional load to your blog, but I don't you'll even notice it.
This was really helpful...Thanks! :)
this is what i've been looking for - thx!
Perfect! Best guide out there.
Thank you very helpful.
What about combining this "Follow" button under the "Retweet" button in your floating social sidebar?
@ http://www.bloggersentral.com/2010/07/install-floating-social-media-buttons.html
thanks!
@Ben Racicot
You can't hide/remove the username part of the button (because the button lies inside an iframe), hence the button won't fit in the floating bar.
This rocks..am gonna try it
Excellent advice, thanks!
nice, must try ! :)
Need help adding twitter handle to tweet button in html.
@Nat
Just replace the word USERNAME with acooknotmad in both places in line 2.
i tried in my another blog and works well...thanks for such a helpful idea :)
Nice Info, Thanks for Sharing, I'm loving Blogger Sentral :)
I love it thanks for offering the best stuff ever for my website!
Thank you! This helped so much!
thanks for great tutorial, keep sharing brot
thanks for the tip ! :)
really nice for my blog, with twitter follow button in my blog will be popular in social,,,thanks...nice share post...
thanks man for that
Great help thanks!
Thank you so much for this, this was fantastic! I do appreciate it!
thanks for this button.
thanks BS
This article is very helpful at all
Thank u very much.'
Think you boss! its very helpfull for me.
What am I missing? There is no Page Elements option under Design...
@Elizabeth Scheib
That's for the old user interface. With the current UI, you need to go to Dashboard > Layout.
Thank you so much. I've been trying to do this for ages but these have been the only clear and helpful instructions!!
Thanks for this. Easy way to put one unlike others where you have to go to Twitter directly (Twitter is blocked in our office!)
thankyou :)
Always wanted to add Twitter to my blogs .Thank you ! Your easy explanation helped.Hoping to find more from your blogs.
Thanks so much for sharing twitter follow button on top, really useful for me: D
thnx! this was very helpful!
Post a Comment
We love to hear from you! Leave us a comment.
To ensure proper display, HTML/XML/Javascript need to be escaped first using this escape tool.