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]
http://pinterest.com/pin/create/bookmarklet/?media=[MEDIA]&url=[URL]&is_video=false&description=[TITLE]
http://www.facebook.com/share.php?u=[URL]&title=[TITLE]
Google+
https://plus.google.com/share?url=[URL]
http://www.reddit.com/submit?url=[URL]&title=[TITLE]
Delicious
http://del.icio.us/post?url=[URL]&title=[TITLE]]¬es=[DESCRIPTION]
Tapiture
http://tapiture.com/bookmarklet/image?img_src=[IMAGE]&page_url=[URL]&page_title=[TITLE]&img_title=[TITLE]&img_width=[IMG WIDTH]img_height=[IMG HEIGHT]
StumbleUpon
http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]
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]
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 (59)
There are already 59 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!
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.
+1 !!!
Totally. Will come back in a few weeks and share the site that these URLs let us build. Thanks a ton.
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 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.
I updated the list with Google+ on 1/5/13. Sorry for the delay.
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.
To add to this:
1. The Facebook share button has been completely depreciated and the above link no longer works. In fact, most of the social share plugins now have inactive facebook share buttons too. However, I found a fix using a Facebook Feed Dialogue. At first glance, to amateurs like myself, it may seem daunting but I managed to get it to work without much trouble. Here is what I did:
- Log in to Facebook Developers (https://developers.facebook.com)
- Create an app. Give it a title like “Share.” Canvas url: http://www.yoursite.com
- After app is created, copy the API ID/Key.
- Use the following code for your facebook button:
There are more parameters that can be added:
https://developers.facebook.com/docs/reference/dialogs/feed/
2. I found a share link for google plus:
https://plusone.google.com/_/+1/confirm?hl=en&url=http://www.your-url/
3. If you want a cool way to automatically create a shortened url using a bitly account for twitter shares, check out the “Tweaking the Twitter syntax” here: http://www.doitwithwp.com/add-sharing-buttons-to-wordpress-no-plugins-or-external-references/
With that, I have one small snag I am trying to work out. Maybe someone here can help.
Before creating my own social share buttons, I was using a plugin that automatically added the share links to my rss feed. There is an option in WordPress SEO to add a rss footer but it does not allow for the php permalink function. Anyone know a good way to add these share links to a rss feed footer?
We don’t need no stinking plugins.
Cheers.
Oooops. No code allowed.
Here is the link for the facebook share:
http://www.facebook.com/dialog/feed?app_id=XXXXXXXXXX&link=&redirect_uri=http://yoursite.com/
Can I use it with joomla
google plus share link
Thank you very much. This is great. I’ve been fighting with this for days and now I can finally smile again
Thank you so much for this! Just used it to embed custom sharing buttons in a PDF and it worked absolutely perfectly!
Very helpful! Thanks
Hi!
It’s great that you’ve compiled a list of how the structure is for all the sites! really saves time! However I would use /images/twitter.png instead of the printed url. Also more useful in your example since that would pretty much allow some people to just copy paste the code straight off!
Hi! great list man! Anyone knows the Pinterest URL?
Pinterest is a little different because you don’t share a whole page, you share parts of a page. You can only accomplish a custom Pin It button by using Javascript.
Pin It
nice list of URLs, always nice to have some ready sitting around. I don’t see Skype on here though:-/
can i get a callback if someone shares my post using google plus. like what we have in twitter. show an alert message. please help me if it is possible. thanks in advance
Thanks! This is great stuff!
Thanks! This helps a lot!
Thanks! This exactly what I was looking for!
I love what you guys tend to be up too. Such clever work and exposure!
Keep up the wonderful works guys I’ve you guys to my personal blogroll.
Being incredibly lightweight and comfortable, Moncler jackets are easily transportable inside a smallish bag.
The name arrives away from a abbreviation of Monestier de Clermont, an
area near to Grenobie where, in 1952 Rene
Ramillion and Andre Vincent founded an amount develop to
become among the essentially the most well-known companies.
Moncler range meant for completely family’such due to the fact Moncler Gents Leather coats, Most women Moncler leather coats, Moncler the younger generation leather coats.
This is the best how-to on creating share buttons that I have found. I’m having trouble, though, with the Tumblr link. I get a “Page not found” message and was wondering if anyone else has had this problem, and/or would know what the solution would be. Thanks!
How about myspace? How to get the image you want to be linked to the URL you share?
I am developing an app of photo editor. and i want to share edited image on tumblr.. As tumbr send url of img which must b uploaded on internet, i am unable to share pic..
plzz help me as soon as possible.. m helpless….
plzzzz help
I was having this same issue and from what I can tell is that it doesn’t like “://” of the url request.
If you changed :// to the encoded version aka: %3A%2F%2F it seems to work.
Hi
Reading the comments below this list is great, unfortunately I am a dummy when it comes to all this stuff even though it sounds all so simple to someone who knows what they are doing
I am looking for Share to Facebook/ Share to Twitter/Google+1/LinkedIn/Email could I ask if you have a few minutes could you set up the code for me please and email it to me I would be ever so grateful?
Thank you in advance for any help
JG
If you are not really comfortable with the above code, I would advise you to checkout one of the many services that make it easy to add share buttons. My personal recommendation is http://www.addthis.com/.
Thanks Chris for getting back to me – unfortunately I have the same issue there when I add the buttons I have no idea how to customize them with my information. No worries, have a good one!
JG
AddThis has great documentation. Read through the documentation on their site and you should be able get everything working.
I have been going from site to site for three days just to get four of them and you have them ALL. Thank you!!
Working on implementing this, but in the case of Twitter, Facebook, Google+ and LinkedIn, instead of actually sharing, these URLs don’t actually submit a share – they only take you to a page on each of the various networks where you can share the content. The result of which has got to be less actual shares. Have you found a way to get around this and just have the first click be the submission?
How do you get two separate blocks for social media icons and related posts list?
It looks clean and beautiful. Can you give some hint on ho to do it?
Nice post btw!
Can you please show me the codes on how to create an (share) button with functions .. please .. cause i’m having a problem with my codes . Thank you sir ..
Trackbacks and Pingbacks (3)
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.