Adding Twitter Follow button to your Blog.

Adding Twitter Follow button to your Blog.


Recently I was just going through my site to check if there is something missing, then I noticed I did not have an easy way for people to follow me on twitter. Also I did not have a widget even, so I decided to place a Twitter Follower button and a Tweet's widget.

Here is the screenshot of the "follow button" widget on my blog.

Newtechnoledge

I searched for how to add "Twitter follow button " and found that this was very easy to do.
You can find more about Twitter widgets on Developers page.

The Follow button is a small widget which allow user to follow a twitter account from any page.

Below is the code you can use to show different follow buttons.


NEWTECHNOLEDGE



Go to blogger Dashboard then go to Template and click on Edit HTML.

Just paste these given codes anywhere in your coding where your wanna display the Follow button.

FOLLOW BUTTON WITH COUNT.

<a href="https://twitter.com/Newtechnoledge"
class="twitter-follow-button"
data-show-count="true"
data-size="large">Follow @Newtechnoledge</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>


If u dont want to Display Counts then just change

data-show-count="true"...... to .....data-show-count="false"
Newtechnoledge

<a href="https://twitter.com/NewTechnoledge"
class="twitter-follow-button"
data-show-count="false"
data-size="large">Follow @Newtechnoledge</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>

Configure your Follow Button


Just change Newtechnoledge to your Twitter username.

There are some properties which allow you to configure the Follow Button and display. Use data-attributes for the Javascript version:

Followers count display :    data-show-count
Language        :    data-lang
Width             :    data-width
Alignment        :    data-align
Size                :    data-size

Comments

Popular posts from this blog

URL Shortener Websites

Best Android Racing games.