Problem redirecting to the self.location (inside iframe) after tweeting


I am trying to use the Web Intents Javascript Events ( to redirect my users to another page after they tweet using the tweet button provided.

The thing is, the tweet button is inside an iframe, and I could not get it to redirect to the desired page. Note: the redirection is supposed to happen inside the iframe too.

Here is what I got for now

the iframe in the parent page (which is the iframe containing the tweet button) is already labeled by id=“main”, but it doesn’t work. I tried self.location.href=‘’ too.

Is there anyway to make this work? Am I doing anything wrong here? I’m pretty much a newbie with Javascript. I would be very glad if anyone could give me the solution, or even pointers :slight_smile:

Thank you in advance, I’d very much appreciate your help.


anyone could help me with this? even any tips/clues would do :slight_smile:


When the tweet event occurs, we provide access to the iframe that the event originated at:'tweet', function (event) { = ""; });

This should do the trick. Let me know if it works!

closed #4

closed #5