Wednesday, 5 December 2012

Twitter tweet callback in Javascript

I was recently trying to callback a function after tweeting a message using Twitter’s web intents. The web intents are popup displays that give the ability to interact with Twitter content without leaving the webpage. I found out there were web intents javascript events which can callback a function. I have a quick example below. I have used an anchor link which will open up the web intents popup window. Once the tweet button has been pressed, the popup window will close and the callback function will get called.

<!DOCTYPE html>
<html lang="en">
 <meta charset="utf-8">
 <title>Web intents javascript events example</title>
 <script src="//" type="text/javascript"></script>
 <script src="//" type="text/javascript"></script>
 <a href="">Testing</a>

 {'tweet', function (event) {
   alert('tweet callback');


  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP