Skip to content

Instantly share code, notes, and snippets.

@nellynette
Created July 27, 2013 05:11
Show Gist options
  • Save nellynette/6093799 to your computer and use it in GitHub Desktop.
Save nellynette/6093799 to your computer and use it in GitHub Desktop.
Social Media Sharing Codes
<!-- Facebook--> <br><a href="http://www.facebook.com/share.php?u=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/facebook.png" alt="Share on Facebook" title="Share on facebook"/></a>
<!--Twitter share-->
<a href="http://twitter.com/home?status=<?php echo urlencode($title).' '.$current_url; ?>" title="Click to share this post on Twitter" target="_blank"><img src="/images/icons/share/32/twitter.png" alt="Share on Twitter" title="Share on twitter"></a>
<!--Google +1 Button -->
<a href="https://plus.google.com/share?url=<?php echo urldecode($current_url); ?>" onclick="javascript:window.open(this.href, '_blank','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img src="/images/icons/share/32/google_plus.png" title="Share on Google+" alt="Share on Google+"/></a>
<!-- Reddit -->
<a href="http://reddit.com/submit?url=<?php echo $current_url; ?>&title=<?php echo urlencode($article_title); ?>" title="Share on Reddit" target="_blank"><img src="/images/icons/share/32/reddit.png" alt="Share on Reddit"/></a>
<!--Digg -->
<a href="http://www.digg.com/submit?phase=2&url=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/digg.png" alt="Share on Digg" title="Share on Digg"/></a>
<!--Tumblr-->
<a href="http://www.tumblr.com/share?v=3&u=<?php echo $current_url; ?>&t=<?php echo urlencode($title); ?>" target="_blank"><img src="/images/icons/share/32/tumblr.png" alt="Share on Tumblr" title="Share on Tumblr" /></a>
<!--Linkedln share-->
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $current_url; ?>&title=<?php echo $title; ?>&source=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/linkedin.png" title="Share on linkedln" /></a>
<!--Delicious share-->
<a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent('<?php echo $current_url; ?>')+'&title='+encodeURIComponent('<?php echo $title; ?>'),'delicious', 'toolbar=no,width=550,height=550'); return false;"><img src="/images/icons/share/32/delicious.png" alt="Delicious" title="Share on delicious" /></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment