Very very simple share button – Twitter, Facebook, Google+ and LinkedIn

social-icons

Icons above can be downloaded free from picons.me. Vector and all. Awesome.

Social Media sharing javascripts are great. DiggDigg, Markerly, AddThis, ShareThis, AddtoAny, Shareaholic to JavaScript library like Socialite.js, options are endless.

But sometimes, you want something really vanilla.

So, here is what I am working with. But I probably need to do some URL Encoding. (Maybe use tools like this?):

Facebook

<a href="http://www.facebook.com/sharer/sharer.php?u=http://example.com&t=Description" target="_blank">Facebook</a>

Twitter

<a href="http://twitter.com/share?text=Description http://example.com" target="_blank">Twitter</a>

Google plus

<a href="https://plus.google.com/share?&hl=en&url=http://example.com" target="_blank">google+</a>

Linked in

<a href="http://www.linkedin.com/shareArticle?mini=true&url=http://example.com" target="_blank">LinkedIn</a>

bonus: Mail

<a href="mailto: ?subject=Description&body=http://example.com">Mail</a>

You are going to need to URLEncode the text that follows = sign (italic above). To do that in JavaScript, you wrap the string in encodeURIComponent function like encodeURIComponent(string).

(Note: I’ve combed through those from site like this and this and this and this and this and this and this.)

This entry was posted in Web/Print Design and Dev. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

One Comment

  1. Posted Monday, April 1, 2013 at 04/01/2013 @ 11:21 am | Permalink

    Thank you very much. This is just what I’m looking for!

Leave a Reply

  • Welcome to Daigo’s Daily Digital Diorama. I blog about... whatever that comes to my mind.
  • Change color

    Purple Red Green Blue No Style

  • Archives

  • Calendar

    March 2013
    M T W T F S S
    « Feb   Apr »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Categories