I am trying to use the Web Intents Javascript Events (https://dev.twitter.com/docs/intents/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=‘http://www.google.com’ 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 
Thank you in advance, I’d very much appreciate your help.