Skip to content

Instantly share code, notes, and snippets.

@timwhite47
Created January 8, 2014 22:53
Show Gist options
  • Save timwhite47/8326099 to your computer and use it in GitHub Desktop.
Save timwhite47/8326099 to your computer and use it in GitHub Desktop.
testing twitter binding to web intents.
<html>
<head>
<title>twitter test page</title>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
window.twttr.ready(function (t) {
console.log('ready', t)
t.events.bind('tweet', function (event) {
console.log('tweet', event)
alert('you tweeted!')
});
});
</script>
</head>
<body>
<p>this is a tweet</p>
<a href="https://twitter.com/intent/tweet?source=tweetbutton&text=asdfasdfasdfasdf%3A%20http%3A%2F%2Factionsprout-core.dev%2FfqzB56">Tweet me!</a>
</body>
</html>
@amiel
Copy link

amiel commented Jan 8, 2014

Cool, so can you open the intent programmatically?

It would be nice to open it programmatically without having to alter the dom...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment