Get 'tweet' event from Twitter Web Intents


I have such simple code for my site, but ‘tween’ event doesn’t trigger. Can someone help me?
NOTE: i need to use exactly to show tweet popup, because some other stuff should be done before twitter popup appears.'tweet', function(event) { alert('tweet!!!'); });

function jsTweet() {
// some other stuff here
// …
var urlTW = “”;, “”, “toolbar=0, status=0, width=650, height=360”);


Are you additionally loading widgets.js from

While it’s likely unrelated, the format of URL in your urlTW variable is wrong – the URL parameter should be percent-encoded. Also, though I know it’s just a placeholder, underscores in a domain name are invalid and this will not likely be evaluated as a valid URL.

Example with proper encoding and usage of a hyphen instead of an underscore:

var urlTW = “”;

All that said, I’m having difficulty getting the tweet event to trigger in other tests I’m performing right now and I will continue looking into this possible bug. Thanks!


URL doesn’t matter, because my code above is just for an example. And of course it is supposed that widgets.js was loaded. Anyway, I am Looking forward to your answer.


@episod, any news on this issue?


When it came time to look into this in more detail we were unable to reproduce the issue. However, I’ll take another look at this as soon as I get a chance.


Web Intents Events does not work. I have tried every which way to bind to the tweet event, but it is never fired. This is a bug guys. Please let us know a realistic timescale for fixing it. This is a pretty essential solution for me and a lot of other developers because your API tools suite doesn’t include a Javascript SDK - there is no other way of easily using Twitter from Javascript! Surely you must have run successful tests for the Web Intents service during development. How did you make it work then?


I’ve begun engaging with you on Twitter about this after your @mention last night. When you have a chance to look into my suggestions, we can resume the conversation here.


this issue is 100% reproducible. Just try to run example from my first post.


Have you tried binding these events while using the pop-up code already provided by widgets.js? If you want to track the events, you should be relying on the widgets.js code to handle the window invocation.


i’m having the same problem, the bind events don’t seem to do anything when using the standard twitter button (that render in an iframe). if i put a plain link on my page then the bind events work…but i want the standard button to work so i get the default look/feel as well as the number of tweets. any chance there’s a solution for that?




apparently there is a blocking bug with the IE implementation of the button


Web Intents Event for “tweet” is not working at all for any browser if I am using

#13 more often than not gets blocked by browser popup blockers. You need to call that function in response to a user action, for example, in a click event handler.


I am doing the same thing.
For example,

My onclick function
function twitterShareClick() {‘tweet’, function (event) {
});“” + myURL+ “&text=myText”, “Twitter”, “status = 1, left = 430, top = 270, height = 550, width = 420, resizable = 0”);

I don’t see any problem with this code


Make sure your event listener is firing - you should also make sure that you’re serving your page from http:// or https://, not file:/// URLs.

The following code worked fine for me:

This is text Link

This is text Link

#17‘tweet’, function(event) {

function jsTweet() {
// some other stuff here
// …
var urlTW = “”;, “”, “toolbar=0, status=0, width=650, height=360”);


You can check my link here.
Its the same code.


Neither Chrome, Firefox, nor Safari had a problem opening the popup from that URL. Which browsers/operating systems do you have an issue with?


The pop up is opening perfectly but I am talking about the callback event i.e. Its not getting fire.