How-To: Create Custom Share Buttons For All The Popular Social Services
For those of you that follow me, you are probably already know that I recently redesigned my post footer. For those that don’t know a post footer is the area just below this post with the “Share It!” and “Related Post” sections. I took it on myself to create a completely custom footer area with share links to many of the popular social services available today. I like my blog to be different from the other gazillion out there, so I choose to minimize my plugin use and create custom solutions.
Most of the popular social service out there offer pre-made javascript buttons that allow you share your pages or articles on their service. While this does make it easy, there is one problem with using their code generating methods; you are stuck with their styles and icons. I wanted to use a custom style with a different set of icons. To accomplish this, I had to take advantage of the services various “URL” submission methods. All the services offer this method, but most of them are poorly documented and are hard to find details on. After spending hours browsing the web for the various “URL” submission methods, I decided that once I finished I would post them all together in one place so people can easily find them and create their own custom share buttons.
Below, I am going to offer you the various services URL’s and teach you how to use them on your site.
http://twitter.com/home?status=[TITLE]+[URL]
Digg
http://www.digg.com/submit?phase=2&url=[URL]&title=[TITLE]
http://www.facebook.com/share.php?u=[URL]&title=[TITLE]
StumbleUpon
http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]
Delicious
http://del.icio.us/post?url=[URL]&title=[TITLE]]¬es=[DESCRIPTION]
Google Buzz
http://www.google.com/reader/link?title=[TITLE]&url=[URL]
http://www.linkedin.com/shareArticle?mini=true&url=[URL]&title=[TITLE]&source=[SOURCE/DOMAIN]
Slashdot
http://slashdot.org/bookmark.pl?url=[URL]&title=[TITLE]
Technorati
http://technorati.com/faves?add=[URL]&title=[TITLE]
Posterous
http://posterous.com/share?linkto=[URL]
Tumblr
http://www.tumblr.com/share?v=3&u=[URL]&t=[TITLE]
http://www.reddit.com/submit?url=[URL]&title=[TITLE]
Google Bookmarks
http://www.google.com/bookmarks/mark?op=edit&bkmk=[URL]&title=[title]&annotation=[DESCRIPTION]
Newsvine
http://www.newsvine.com/_tools/seed&save?u=[URL]&h=[TITLE]
Ping.fm
http://ping.fm/ref/?link=[URL]&title=[TITLE]&body=[DESCRIPTION]
Evernote
http://www.evernote.com/clip.action?url=[URL]&title=[TITLE]
Friendfeed
http://www.friendfeed.com/share?url=[URL]&title=[TITLE]
Those are the URL's you need to know, now, I know some of you are say what do I do with them? These are the URL you link your social icons too. Replace [TITLE] with the title of the page or article. Replace [URL] with the link back to the page or article. Both of these values need to be URL in encoded for the submissions to process correctly. If you are using php, you can easily URL encode anything with:
<?PHP echo urlencode("VARIBLE"); ?>
If you are using WordPress, you can easily substitue the [URL] and [TITLE] values with WordPress codex functions. Below is the code you can use to replace the [TITLE] value:
<?php print(urlencode(the_title())); ?>
Now, the the code to replace the [URL] value:
<?php print(urlencode(get_permalink())); ?>
Now, lets take a look at it all put together for a general page with a "Share on Twitter" button:
<a href="http://twitter.com/home?status=This is the blog title.+http%3A%2F%2Fatlchris.com%2F1656%2Flink-to-page">
<img src="http://atlchris.com/wp-content/themes/ATLChris/images/twitter.png" height="18" width="18" alt="Share On Twitter" />
</a>
Now, a wordpress example. This example substitutes the [TITLE] and [URL] values automatically with the current articles information with URL encoding:
<a href="http://twitter.com/home?status=<?php print(urlencode(get_permalink())); ?>+<?php print(urlencode(the_title())); ?>">
<img src="http://atlchris.com/wp-content/themes/ATLChris/images/twitter.png" height="18" width="18" alt="Share On Twitter" />
</a>
I hope this helps to you create your very own custom share buttons. If you have any questions, please ask them below and I will answer them to the best of my ability. If I missed a service that you would like me to add, please leave a comment below.

Discussion In Progress (32)
There are already 32 comments on this post. Why don't you add another, and join the discussion.
Thanks for sharing! I was just looking for a way to create custom share buttons and I found all in one place here!
Canon Powershot G11 dead pixels? I’m not as well sure if it’s what you call dead pixels, but on the LCD display, there are small black dots. I am aware it really is not dust or dirt within the lens, since it seems in pictures I’ve taken ahead of I had this issue. You will find about three or four black dots on the LCD display, and they are not too close to every other. I purchased my camera in September. Need to I send it in to Canon to acquire it fixed?
Hey man, you did a great work! Tankx
You’re a fucking hero for these. Thanks! And screw social networks for not making this doc easy-to-attain for the sake of ugly branding.
Hello,
Thank you for the URL link to share Tumblr.
WordPress wants me to also add the icon URL in my share settings.
” Enter the URL of a 16x16px icon you want to use for this service”
I am completely stuck and have been searching online all day…..??
I am new to the “blogging” world but surely there must be someone on WordPress that has created a share button with tumblr…????
omg thank you! I have been looking everywhere for something like this! so helpful! thank you so much!
Thanks for posting this. I’ve been asked about how to get some of these custom share buttons especially for Digg which is a royal pain in the ass if you get it from their site. You would think after all this time they would make it dummy proof and easy.
Social bookmarking is the great viral marketing tools!
thanks for your tutorials on How-To Create Custom Share Buttons For All The Popular Social Services
Thanks for this – very helpful.
Just tweeted this to you, actually, since these URLs have saved me from more searching. Figured I’d post it here too, explain it better than can be done in 140 characters.
The titles aren’t encoding properly, at least not from what I can see. The ampersand (&) stays as an ampersand in my page titles, and it throws off the URLS. According to http://wordpress.stackexchange.com/questions/14114/urlencoding-of-the-title-doesnt-work, it shouldn’t be
print(urlencode(the_title()));
but
print(urlencode(get_the_title()));
Also, from what I have tried, a plain urlencode(get_the_title()); works just as well, no need for the print(); function, but maybe that is just me and how I have done it.
Great Job my friend! You helped me a lot!
By the way have you find anything for Google+ ?
Try this – Adding a Google+1 link to an email newsletter. It worked for me.
thanks man… i was going throw facebooks API and going insane about the amount of code I was going to do just to put up a like button… not to mention the stuck in to their design part…
thanks for sharing…
God Bless you, Chris! I just found this page on creating custom share social links and it is exactly what I was looking for. Your post shows a great deal of insight and vision that speaks well to what you are doing.
I would love to connect sometime. I am in Atlanta (Buford/Sugar Hill/Suwanee area in Gwinnett) as I am going to need some web help with my blog (http://Linked2Leadership.com) and my upcoming newsletter site (www.LeaderBrief.com).
Tom Schulte
Thank you very much for your information about share address this help me
I noticed that LinkedIn has a [SOURCE/DOMAIN] field, and Delicious has a [DESCRIPTION] field. What Codex do we replace those with, when using WordPress?
Thanks for this great post – HUGE help!
How can I add slashdot share button in my website?
Thanks for this!! But I was wondering, can I create a share button that shares on more than one social network just at once just by clicking it?
I mange my blog in blogger platform how can i use this in blogger
You can also add the My Tasty Life as a sharing site for your coloumn. It is also in use these days.
THANKYOU THANKYOU THANKYOU!!!
A useful but often ignored way of getting sharing buttons on your site. The pre-made javascript versions and plugins are usually cumbersome or hard to customise. This is far easier to use.
Hi, great post! Just implemented some custom buttons on my site, however when I try to share a post through twitter it replaces all dashes with a question mark.
for example “Hi – hi hi”
changes to “Hi ? hi hi”
Can you shed some light on how I can fix that?
exactly what i need now, thanks a lot, that’s very heplful for me, i will add it to every post on my website if it will not slow my pages..thanks again man !
Thanks!!!
Terrific! This is exactly what I need. You’re my hero.
I’ve found the code to “like” and “+1″ on both facebook and google+, is the following. (wordpress format)
facebook like:
<a href="http://www.facebook.com/plugins/like.php?=+” title=”Share this story on your facebook page” target=”_blank”>facebook
google+ +1
<a href="http://plusone.google.com/_/+1/confirm?hl=en&url=+” title=”Share this story on google+” target=”_blank”>google+
Hope it helps.
How-To: Create Custom Share Buttons For All The Popular Social Services – ATLChris | Chris Lentz http://bit.ly/diBNme
This comment was originally posted on Twitter
Blog Post: How-To: Create Custom Share Buttons For All The Popular Social Services http://ow.ly/17LOCt
This comment was originally posted on Twitter
How-To: Create Custom Share Buttons For All The Popular Social Services – ATLChris | Chris Lentz http://bit.ly/diBNme
This comment was originally posted on Twitter
How-To: Create Custom Share Buttons For All The Popular Social Services – ATLChris | Chris Lentz http://bit.ly/diBNme
This comment was originally posted on Twitter
Trackbacks and Pingbacks (2)
Below, is a collection of trackbacks and pingbacks related to this article. For those that don't know, trackbacks and pingbacks are sites that mention and/or link back to this specific article.