I’m trying to use Twitter web intents via a Flash application, and none of my event listeners are functioning correctly. Because it is triggered from Flash, I cannot use a normal link, and instead must use Javascript’s window.open(). I have been Googling around, and it seems like this is a problem with opening Tweet windows via window.open().
Is this a solvable issue? Thanks!
<script type="text/javascript" charset="utf-8">
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
js.src="//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
</script>
twttr.ready(function (twttr) {
twttr.events.bind('tweet', function(event) {
alert('tweet complete');
// Do something there
});
twttr.events.bind('click', function(event) {
alert('clicked');
// Do something there
});
});