46 Add "Digg it!", "Del.icio.us" and other social bookmark links to your posts
August 19, 2007 /

Although I am a faithful user of "AddThis" social bookmark buttons, I've been looking for a way to insert specific social bookmarking links so readers can easily submit individual posts to Digg, Del.icio.us, Technorati and other social bookmarking sites. Now, if you take a look at the bottom of each post, you'll notice these links in place. Here's how to add such links to your own blog posts:

The links you need to add to your template are called by the <a expr...> expression, and are unlike regular links in that they use javascript-style coding to work properly. Each link will look something like this:

<a expr:href='"http://digg.com/submit?phase=2&amp;url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>DiggIt!</a>
Unlike regular links which you could feature in the body of your posts, you need to replace some HTML code (escape the code), which is why the & symbol is replaced by &amp; in these links. The section I have highlighted in red varies depending on the bookmarking link you wish to use; all of the remaining code remains the same for all social bookmark links.

To keep things simple, I'll show you how to add Digg, Del.icio.us and Technorati bookmarking links to your posts in this tutorial. If you would also like to use other social bookmarking sites, you'll find their links further down the page.

For Blogger Layouts (New Blogger)

Here's how to make those links appear in each of your blog posts:

  1. Before making any adjustments to your template, ensure you have made a backup of your original template by going to Template>Edit HTML in your Blogger dashboard and clicking on the "Download Full Template" link near the top of the screen. Then if you accidentally make a mistake, you know you can easily restore your template to it's original form!
  2. Now, check the "expand widget templates" box is ticked, then search for this section of code:
    <div class='post-footer'>
    If you want the social bookmark links to be in your post footer (above the author details, comment links, etc), you will place the link codes below this line. If you prefer them to feature right at the bottom of each post, scroll up slightly until you see the <p><data:post.body/></p> line, and place the code just below this instead.
  3. The code you need to insert is as follows:
    This will make the links look like this:
    DiggIt!   ♦Add to del.icio.us   ♦Add to Technorati Faves

    Be sure to copy and paste the code exactly as it appears: accidental spaces or line breaks will stop the code from working properly in your template!
  4. Preview your template to ensure it looks the way you want and then save it. Now you can test the links to ensure they work properly by viewing your blog posts and clicking on the links.

The following are links to all social bookmarking sites which I have tested and found to work in new Blogger layouts:

Del.icio.us <a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Add to del.icio.us</a>
Digg <a expr:href='"http://digg.com/submit?phase=2&amp;url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>DiggIt!</a>
Reddit <a expr:href='"http://reddit.com/submit?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Reddit</a>
Stumbleupon <a expr:href='"http://www.stumbleupon.com/refer.php?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Stumble This</a>
Google Bookmarks <a expr:href='"http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Add to Google Bookmarks</a>
Yahoo My Web <a expr:href='"http://myweb2.search.yahoo.com/myresults/bookmarklet?t=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Add to Yahoo MyWeb</a>
Technorati <a expr:href='"http://technorati.com/faves?add=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Add to Technorati Faves</a>
Slashdot <a expr:href='"http://slashdot.org/bookmark.pl?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'>Slashdot it</a>

You can further customize these links by adding seperators between them, as I did in the example above. I used &#9830; to create diamond shaped bullet points. You could use spaces, slashes or anything else you wish instead. A good reference for the html code needed for special characters can be found here.

For Classic Blogger Templates:

  1. While the process is very similar to that of Blogger Layouts templates, I have to say it's much easier to insert these links into Classic templates!. As before, make a backup of your template before making any adjustments (you can highlight all of your template in the editing window, then copy and paste to Notepad for this).
  2. Find this section in your blog template:
    <p><$BlogItemBody/$></p>
  3. Add the following code right beneath this line to feature Digg, Del.icio.us and Technorati social bookmark links in your blog posts:
    &#9830;<a href="http://digg.com/submit?phase=2&url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">Digg it</a> &nbsp; &#9830;<a href="http://del.icio.us/post?url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">del.icio.us</a> &nbsp; &#9830;<a href="http://technorati.com/faves?add=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">Add to Technorati Faves</a>
  4. This will again produce links which when clicked will enable readers to add your post URLs and titles to their favorite social bookmarking sites.

Here is the full list of different links I have tested for Classic Blogger templates:

Del.icio.us <a href="http://del.icio.us/post?url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">del.icio.us</a>
Digg it <a href="http://digg.com/submit?phase=2&url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">Digg it</a>
Reddit <a href="http://reddit.com/submit?url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">reddit</a>
Yahoo My Web <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<$BlogItemTitle$>&u=<$BlogItemPermalinkURL$>">Yahoo MyWeb</a>
Google Bookmarks <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">Google</a>
Stumbleupon <a href="http://www.stumbleupon.com/submit?url=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">StumbleUpon</a>
Technorati <a href="http://technorati.com/faves?add=<$BlogItemPermalinkURL$>&title=<$BlogItemTitle$>">Add to Technorati Faves</a>

I hope this tutorial helps you to add these links to your Blogger posts! Please leave your comments and suggestions below.

Technorati Tags: | | | | | |

46 Comments:

24 August 2007 14:06 Editor said...

Hi,

I tried to copy your text in the box above into my template. But I get this error message

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "title" must end with the ';' delimiter.

24 August 2007 16:13 Amanda said...

@ Editor: my apologies for this: the html file in the iframe was not correctly formed! I have uploaded a new file which will be displayed if you refresh this page. This should work fine when you copy and paste into your template.

Do let me know if you still have troubles with this code!

11 September 2007 11:51 Admin said...

Add social bookmarks to your blog site such as digg, del.icio.us and StumbleUpon with simple code:

http://100-dollars.blogspot.com

8 November 2007 11:23 Mr. UnloadingZone said...

Thanks! Put the code where you said and it worked great! Would have never figured it out on my own. I appreciate you posting this.

20 November 2007 15:45 Erin said...

Worked perfectly! Thanks!

7 December 2007 09:36 moderator said...

I've made some code to embed social bookmakings in your page. Direct link to the post in my AdSense Blog http://adsensical-adsense.blogspot.com/2007/12/blogger-blogspot-social-bookmarks.html

16 December 2007 22:34 Miss White said...

Brilliant thanks!

2 March 2008 11:18 Steve said...

Excellent, just what I've been trying without success to figure out. Thanks very much for the post, easily editable too. Great work.

Steve
Rental Properties In France

12 March 2008 14:39 ambatisreedhar said...

How to add delicious,diggit to my blogspot ?
This is my blog: http://ambatisreedhar.blogspot.com
Tell me the steps in brief please.
ambatisreedhar@gmail.com is my mail id.
Thanks
Sreedhar

13 March 2008 20:49 Natxo said...

hey this was great, it worked perfectly. but how can i turn those footers into icons instead of the "digg it" or "stumble it"?

25 March 2008 17:33 Olga, the Traveling Bra said...

Thanks! Works perfectly!

26 March 2008 22:28 Oli said...

Once this is done, how do I insert a line break between these links and the author etc?

Cheers

8 April 2008 22:24 Paul Canning said...

Thanks. You're a star. And I've added a link 2u ;]

10 April 2008 23:42 Amanda said...

For Oli:

The easiest method would be to add <br/> after your final link (or <br/><br/> if you'd prefer to make a space between these lines).

Hope this helps!

For Paul Canning: Thanks for the link! I'm glad this post was useful for you.

5 May 2008 05:15 Paul Canning said...

I was having problems getting technorati updates and because I'd just done this, thought the two might be related. so i took this off :{

now trying to redo this and getting

error bX-qarjrd

tried various spots in code + variations

but then - after maybe an hour of looking around - I remembered, this is because I use Firefox. Flicked on ietab and voila!

now eating my computer resources and I'm using a slow clumsy browser ..... may be worth mentioning in your posts that Blogger/Google expects you to do things in IE ...

12 June 2008 08:54 Y. S. said...

I added it. Thanks. :)

14 June 2008 20:12
Anonymous said...

too good

12 July 2008 09:00 Lee said...

Thanks for this, the code worked perfectly!

@paul canning: I know it's been a while since your post and have probably figured it out, but for anyone who doesn't know how to fix the "bX-qarjrd" error, clear out your cookies and cache in firefox and it will work all fine again. I spent a few minutes wondering if the code was messed up, but that isn't the case at all.

So the reason it worked in ietab for you is that you had either no cookies for blogger in IE or just out of date cookies.

12 July 2008 13:09 Paul Canning said...

Cheers for the tip Lee!

1 August 2008 07:59 PatriCa BB said...

Hi, it works for me! Have been reviewing this in many other blogs, but yours is the clearest to follow! Thanks!!

12 September 2008 00:04 Disk Jo Slim said...

I just tried to paste the code following your instructions and I received this error message : bX-btcv0r

Your help will be greatly appreciated
Thanks

21 September 2008 03:37 BloggingFun said...

Worked great! Thank you!

27 September 2008 22:08 Sandra said...

How do I add stumble this, google bookmarks and my yahooweb to this? I've tried and the only thing that works is the original script!

Thanks!

6 October 2008 05:38 Obliv1on said...

Thanks for the code, it helped me out big time!

buckledover.blogspot.com

14 October 2008 15:21 technoplex said...
This post has been removed by the author.
29 October 2008 10:59 ET said...

Great code, I've know more about expr:href..
Thank you

31 October 2008 15:02 Sopan said...

thank you, worked fine for me :)

22 November 2008 22:47 Dr. Dave said...

http://feedyouradhd.blogspot.com

I had all kinds of problems until I, too, remembered I use Firefox. When I switched to IE and added your code, it worked perfectly. Many thanks, Amanda.

20 December 2008 01:24 Dr. Dave said...

I added Blogger's "Reactions" widget to my posts. You have to revert to widgets to template default in order to add it. This wipes out your code. When I try to add it back, the digg, technorati, etc., buttons will not reappear, no matter what I do (and I did use expand widget templates), I can't get the buttons to reappear. It appears I can have EITHER the social networking buttons or Blogger's "Reactons." Do you know of a workaround?

23 December 2008 23:09 Handcrafted Media said...

Thanks a bunch - great instruction!

15 January 2009 08:50 The Mixdiggerz said...

Fucking great!!!!!
finally I found it and ik works great..
Thx..
Dadexter

http://mixdiggerz.blogspot.com/>

26 January 2009 09:49 Cari said...

Thanks so much! I looked at 20 different google results for add digg button on blogger before you. Yours are by far the clearest, most easily followed directions I found. Thank you!

29 January 2009 03:47
Anonymous said...

How about adding a "share on Facebook" link?

15 February 2009 21:53 Anne said...

THANK YOU!!! I've been looking everywhere for an easy way to do this! You're the best!

28 February 2009 19:38 D. Patrick Caldwell said...

Awesome! Thanks a lot. I used your scripts (with a few modifications) and added several scripts of my own. If you'd like, you can find them on my blog.

15 March 2009 19:42 Fatima said...

Thanks for this! It took me a few tries, but I did get it to work, and it even looks nice!

2 April 2009 12:45 Jeannette said...

Thank you so much for this post. A year and a half later, and it is still being used. Well done.

3 April 2009 16:29 SambiT Rul3z said...

hey a amanda thanks for this tut

but can i add picture???imean i dont want to use text i want pics

how can i???

3 April 2009 16:59 SambiT Rul3z said...

thnaks for this one

but can i add pics??

i mean i dont like text only and want to add site logo can i do it???

17 April 2009 09:47 Ruben Zevallos Jr. said...

I'm looking for some bookmarks like this Stumble It! (3 Reviews)... I saw it in your blog, but not info about

1 May 2009 16:08
Anonymous said...

Thanks for this! Been looking for this for a long time.

22 September 2009 16:00 vivek.bandebuche said...

Thanks for this post......... very nice post.....

5 February 2010 17:44 RebeL'z said...

thanks...great post!!

18 May 2010 13:06 evao said...

Great thank you,you have made my life much easier!!

Post a Comment

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me