While trying to place some social buttons on this blog, I started by digging into the documentation for each major site:
Facebook's Like-button
Google's +1-button
Twitter's tweet-button
.. etc.
Pretty simple stuff, but unless you're afraid of depending on another third party, it's even simpler:
AddThis.com
One tiny block of very readable, very configurable tags, and they'll handle it all for you and keep your code updated. One neat feature is to let them decide which buttons to display, based on which services the user prefers. Tumblr users will see a tumblr button, g+ users will see another.
Oh, and they support over 300(!) services. Neat!
Here's the code currently being used for the buttons above this post:
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e4a89506768955b"></script>