Add Twitter Official Tweet Button to Blogger

Twitter has released their official share buttons with counter. In this tutorial we will discuss on how to add this Tweet Button to Blogger

Twitter Share Tweet Button for BloggerIn this new Tweet Button, you can customize the size, mention yourself and can also mention related Twitter user whom you may want to be followed by others. So have a look at the live example below by tweeting it.

Tweet Button for Blogger Posts

Step 1: Go to Blogger’s Template tab, click “Edit HTML” and tick “Expand Widget Templates”.

Step 2: Find closing </body> tag and before it add:

<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>

The JavaScript API should be added once, it is not needed to load it for every button shown on a single page, for example, if you want to have both Tweet and Twitter Follow buttons.

Step 3: Find <data:post.body/> and above or below it (or both) add the code below after generating it.

Button options

Popular posts from this blog

How to Add Extra Gadget/Widget Section to Blogger Header

Add Google Web Fonts to Blogger

Add Open Graph Protocol Meta Tags to Blogger