KeyLimeTie Blog

How to Add a Digg Link to Your Website

By Brian Pautsch – 6/3/2007 1:56:56 PM. Posted to Code Snippets.

If you're not familiar with Digg.com, you might want to check it out.

What is Digg?
"Digg is a user driven social content website. Ok, so what the heck does that mean? Well, everything on Digg is submitted by our community (that would be you). After you submit content, other people read your submission and Digg what they like best. If your story rocks and receives enough Diggs, it is promoted to the front page for the millions of visitors to see.

What can you do as a Digg user? Lots. Every person can digg (help promote), bury (help remove spam), and comment on stories... you can even Digg and bury comments you like or dislike. Digg also allows you to track your friends' activity throughout the site — want to share a video or news story with a friend? Digg it!"

I have been visiting Digg at least 2-3 times per week to read the quick posts. I usually jump directly to "Top in 24 Hours" page. This page usually has some really interesting links: http://www.digg.com/news/popular/24hours

If you decide to post a link, be sure your server can handle the hits. Everyday, sites crash due to too many hits too fast from Digg users. Or if your hosting provider has limits on bandwidth, you might lose your account all together. Fortunately, we have our own servers and can handle this type of traffic.

Back to the topic of this blog...if you decide to post a link on Digg, here's the snippet of code you need to add to your website to add the Digg Link to your website:

<script type="text/javascript">
    digg_url = "digg url to your link";
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

For example:
<script type="text/javascript">
    digg_url = "http://digg.com/software/20_Promo_Code_SGMAY07_good_for_1_week";
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

results in this:

Comments

On 1/8/2010 steven said:
Great example, thanks!

On 6/27/2007 Pablo Honey said:
I digg.

Leave a Comment

Name:
Email:
URL:
Comment:
Security Code:
Type Security Code:

Photos on Flickr

More Photos »

Search Blog


Get Email Updates

Like what you read here at KeyLimeTie? Sign up for our email list!

Subscribe