Skip to content

Instantly share code, notes, and snippets.

Last active December 20, 2015 19:49
What would you like to do?
Tracking tweets using Web Intents and the Twitter API
<!-- Include the twitter JS library -->
<script type="text/javascript" src="//"></script>
<!-- Tweet button with just text -->
<p><a href=" first tweet using Web Intents">Tweet</a></p>
<!-- Tweet button with link and text -->
<p><a href=" tweets using Web Intents:"><img src="" /></a></p>
<script type="text/javascript">
twttr.ready(function (twttr) {
// bind to the tweet event'tweet', function( event ) {
// add ajax call here to store the tweet details
// i.e. increment a counter in your database
console.log( event );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment