Skip to content

Instantly share code, notes, and snippets.

@iamnewton
Created February 11, 2015 23:53
Show Gist options
  • Save iamnewton/1b60cc9a8b231b0c9c50 to your computer and use it in GitHub Desktop.
Save iamnewton/1b60cc9a8b231b0c9c50 to your computer and use it in GitHub Desktop.
Responsible Social Share Links

Share URLs

Here’s a collection of common social share URLs and examples of their structures along with links to documentations.

(The code has been broken up into several lines for readability—remember to remove any spaces and line breaks in the href if you copy & paste.)

Taken from Responsible Social Share Links

<a href="https://www.facebook.com/sharer/sharer.php
?u=https%3A%2F%2Fjonsuh.com%2F"
target="_blank">Share on Facebook</a>
<!-- Parameter u is required -->
<a href="https://plus.google.com/share
?url=https%3A%2F%2Fjonsuh.com%2F"
target="_blank">Share on Google+</a>
<!-- Parameter url is required. Read the documentation -->
<a href="https://www.linkedin.com/shareArticle
?mini=true
&url=https%3A%2F%2Fjonsuh.com%2F
&title=Jonathan%20Suh
&source=https%3A%2F%2Fjonsuh.com%2F
&summary=Short%20summary"
target="_blank">Share on LinkedIn</a>
<!-- Parameter mini is required and must be true, url is required. Read the documentation -->
<a href="https://www.pinterest.com/pin/create/button/
?url=https%3A%2F%2Fjonsuh.com%2F
&media=https%3A%2F%2Fjonsuh.com%2Ficon.png
&description=Short%20description
&hashtags=web,development"
target="_blank">Share on Pinterest</a>
<!-- Parameter url is required. Read the documentation -->
<a href="http://www.reddit.com/submit/
?url=https%3A%2F%2Fjonsuh.com%2F"
target="_blank">Share on Reddit</a>
<!-- Parameter url is required. Read the documentation -->
<a href="https://twitter.com/intent/tweet/
?text=Visit%20my%20website
&url=https%3A%2F%2Fjonsuh.com%2F
&via=jonsuh
&hashtags=web,development"
target="_blank">Share on Twitter</a>
<!-- All parameters are optional. Read the documentation -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment