Javascript error in tweet button all the time and no solution yet?


#1

I am trying to capture whether a user did really twit my message or not. So I use twitter’s callback mechanism. But I keep getting Javascript error. I am using chrome.

My html is ----

foobar

Error I get ----

Unsafe JavaScript attempt to access frame with URL http://platform.twitter.com/widgets/tweet_button.1366232305.html#_=13670280…allo%20wie%20geht%20es%20di&url=http%3A%2F%2Fmywebsite.com&via=myscreennme from frame with URL http://www.mywebsite.com/twit.php. The frame being accessed set ‘document.domain’ to ‘twitter.com’, but the frame requesting access did not. Both must set ‘document.domain’ to the same value to allow access.

Any idea what is wrong?

@episode


#2

Same issue here, someone posted this on github as a fix until Twitter fixes it also:

Maybe it will help you for now.


#3

Hi guys,

So, the security warning is an ugly but unfortunately inevitable consequence of the messaging system used to power the current version of Web Intent Events. You can see the same message triggered by other service’s JavaScript as well.

However, it’s not an error, in so far as it’s not actually breaking functionality, the script is not blocked nor crashed, it’s just a console warning trigger because there are other cross-domain frames on the page.

As someone who spends a substantial amount of his day staring at the JavaScript console, rest assured I find it annoying as well, but it’s an unfortunate case that WebKit has started being more aggressive about the warnings without providing a cleaner API for finding the right frame to send messages to.

That said. We are going to reimplement the messaging system in the near-ish future (see last months IE6 and IE7 deprecation notice) and the current design I’m working on will not trigger these annoying messages. So my hope is that although it’s not really a error now, it’ll still be tidier in the future.

Ben


#4

I am waiting for this repair!!


#5