Skip to content

Instantly share code, notes, and snippets.

@mikedijkstra
Created December 18, 2011 02:39
Show Gist options
  • Save mikedijkstra/1492191 to your computer and use it in GitHub Desktop.
Save mikedijkstra/1492191 to your computer and use it in GitHub Desktop.
Social Share Links

#SOCIAL SHARING LINKS

##Copy and paste the following into the HEAD of your page:

<style>
	#social_share span {display: inline; float: left; vertical-align: top;}
	#social_share span.title {font-weight: bold; font-size: 1.2em; margin-right: 10px;}
</style>

##Copy and paste the following where you'd like the share buttons to appear:

<div id="social_share">

	<span class="title">Share this article:</span>
	<!-- Twitter Tweet Button
		Set data-via="Username" to your Twitter username
		Set data-text="Default Message" to the default share text
		All settings are listed here: http://dev.twitter.com/pages/tweet_button
	-->
	<span>
		<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
		<a href="http://twitter.com/share" class="twitter-share-button" data-via="Username" data-text="Default Message">Tweet</a>
	</span><!-- End Twitter Tweet Button -->

	<!-- Facebook Like Button --><span>
		<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
		<fb:like layout="button_count" show_faces="false" width="10"></fb:like>
	</span><!-- End Facebook like button -->

	<!-- Google +1 Button --><span>
		<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
		<g:plusone size="medium"></g:plusone>
	</span><!-- End Google +1 Button -->

</div><!-- social_share -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment