New Sharing Buttons! (and how to get your own)
The other day I was asked by someone to add some share buttons to my blog. After taking a little look into it, I found that it really wasn't that difficult to do. Now you'll find three share buttons at the bottom of each post. To start with I picked Twitter, Facebook and Evernote, but if you would like to see any other services just leave a comment down below.
The new sharing buttons are surprisingly simple. All they are is an image wrapped in a specially constructed hyperlink:
https://twitter.com/share?url=<url>&text=<text>&via=<via>
https://facebook.com/sharer/sharer.php?u=<url>
http://www.addtoany.com/add_to/evernote?linkurl=<url>
Simply replace <url>
with your url, <text>
with your text, and <via>
with your twitter handle (without the @ sign). Don't forget to run everything through rawurlencode()
though, otherwise some special character might sneak through and break the link.