How to make "Tweet This" or "Post to Facebook" links
If your website has an audience comprised of many Facebook and/or Twitter users, you might be thinking of ways you can get them to share your postings on Facebook and Twitter.
Currently, most blogs, sites, etc. either do this one of two ways: They require the user to copy out the URL from the address bar, then paste it into a Facebook status update or a Twitter posting (sometimes also having to go through the TinyURL service as well!), or they have a 'share this' or 'add this' button hosted by a third party site.
But what if you want to keep things simple, and stick to a plain old, no-frills text link, or keep your focus mainly on one of the two giants: Facebook or Twitter? Well, turns out, the process is pretty simple: just take one of the two URLs below, and after the end, add in the link and/or text you'd like people to share via a status update.
- Facebook:
http://www.facebook.com/share.php?u=<add your link here> - Twitter:
http://twitter.com/home?status=<add your link and/or text here>
In both cases, you could just get by with pasting in your URL. For instance, if I want you to be able to share this post on Facebook, I can use the following link:
http://www.facebook.com/share.php?u=http://www.opensourcecatholic.com/articles
Same as above, but an actual link.
Twitter can go a step further; you can actually put the text you want people to tweet right in the link, like so:
http://twitter.com/home?status=New post on Open Source Catholic! View it at http://www.opensourcecatholic.com/articles
Same as above, but an actual link.
This works great for one-off links, but you can actually put something like this into your website or blog's template (if you use a Content Management System), so that every single post you make has an automatically generated 'tweet this' or 'share on facebook' link. There are some pre-built modules or widgets that do this for you in Wordpress, Drupal or Joomla, but for ultimate control, you can do it yourself.
![]()
Finally, if you're looking for a cool and recognizable icon for your 'social sharing' links, look no further than the open-sourced Share This link icon, which was created to clean up the clutter of a hundred social sharing logos. (It's similar to the standard and open-sourced RSS icon, as well as the other Open Sharing icons...).

Comments
Great post and very useful. Do you happen to know how to also use a text link to update one's LinkedIn status? I've read several posts that demonstrate how to share a full article or blog post on LinkedIn, but I'm needing just the equivalent of what you've shown how to do on Twitter and Facebook but on LinkedIn. Any help would be appreciated.
Sorry, but I haven't seen anything on LinkedIn. I don't know too many people who use it for status/news updates, though, so I don't know how effective such a link would be :-(
Advancing the faith.
If you need to encode your tweet text into a url-safe string: http://quick-encoder.com/url
I am not sure of a code that will automatically post to Linkedin Status' -- but you could always link your Linkedin account with your Twitter account. Then anything you post to Twitter will automaticlaly be updated to your Linkedin Status' as well.
thanks .. you saved my time !
It works fine, but how do you include hashtags for the twitter link?
Unfortunately, you can't add hashtags using this method. You *might* be able to urlencode them, but I don't think that would work correctly...
Web developer from St. Louis, MO. Personal website: Life is a Prayer.
Post new comment