Title: Sharing buttons without Javascript
Slug: sharing-buttons-without-javascript
Date: 2012-02-01 23:56:00
Author: Kartones
Lang: en
Tags: Social, Tools, Development
Description: A list of URL-based sharing options for various social media platforms, eliminating the need for external javascripts.

<p>One thing I'm maniac about is trying to have as less external javascripts as possible in my websites. </p>
<p>Because of this, the typical share buttons get me mad, as they usually have an associated javascript file, which does from not-so-async-rendering, to rendering an iframe, to even nasty cookie tracking (e.g. Facebook's Like).</p>
<p>Recently I finally found how to share in Google+ (specifically, doing a +1) without needing any javascript. I already had the other typical sharing button urls, so here is the small list of url-based sharing:</p>
<ul>
    <li><b>Twitter</b>:<br><code>https://twitter.com/intent/tweet?text=YYYYY</code></li>
    <li><b>Google+ +1</b>:<br><code>https://plusone.google.com/_/+1/confirm?url=XXXXX</code></li>
    <li><b>Google+</b>:<br><code>https://plus.google.com/share?&amp;hl=en&amp;url=YYYYY</code></li>
    <li><b>Facebook</b>:<br><code>https://www.facebook.com/sharer/sharer.php?u=XXXXX</code></li>
    <li><b>LinkedIn</b>:<br><code>https://www.linkedin.com/shareArticle?mini=true&amp;url=YYYYY</code></li>
</ul>

<p>Remember to always URL-encode the URL and text parameters.</p>
<p></p>
<p>I know there are more but in general when I see a dozen buttons I ignore all of them so I'm leaving the minimum I want to have.</p>

<p><b>UPDATE</b>: Removed Tuenti (as the social network is dead) and added LinkedIn and Google+ URL sharings.</p>
