sebnilsson.com | Liquid Development Is What I Do
Seb Nilsson

Add Facebook Like, Twitter Tweet and Other Social Links to Your Blog

If you want people to be able to quickly and easily link to your blog-posts or pages in general you can take some shortcuts to get that functionality by using AddThis.

There are several ways to include buttons from AddThis to your page, but for standard functionality with a good overview I would say point to using regular HTML with some automatic JavaScript-magic happening in the background.

The basic code looks like this:

<div class="addthis_toolbox addthis_default_style">
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_tweet"></a>
    <a class="addthis_button_email"></a>
</div>

There is a very well documented and detailed API Reference on AddThis' website.

Customizing

There are some additional classes you can add to the link-tags to make specialized customization to the buttons. If you add addthis_32x32_style the icon will become larger and stick out more. It could be used on the more popular social sharing services.

<div class="addthis_toolbox addthis_default_style">
    <a class="addthis_button_facebook addthis_32x32_style"></a>
    <a class="addthis_button_twitter addthis_32x32_style"></a>
    <a class="addthis_button_digg addthis_32x32_style"></a>
    <a class="addthis_button_delicious addthis_32x32_style"></a>
    <a class="addthis_button_google"></a>
    <a class="addthis_button_googlebuzz"></a>
    <a class="addthis_button_blogger"></a>
    <a class="addthis_button_tumblr"></a>
    <a class="addthis_button_posterous"></a>
</div>

Which produces a result that looks like this:

With this code Facebook, Twitter, Digg and Delicious are twice the size of the other ones.

AddThis has an extremely long list of supported sharing services supported.