Unable to bind a handler to any event in web intents

Katie_Flowerini
@Katie_Flowerini Kate Bayrachnaya

It seems to be a problem to track events in a way described here - https://dev.twitter.com/docs/intents/events#click

Even the simplest code ain't working

  1. <head>
  2.     <title>Twitter</title>
  3.     <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  4.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
  5. </head>
  6. <body>
  7.     <h1>Twitter</h1>
  8.  
  9.     <p>
  10.         <span class="btn-holder">
  11.             <a href="https://twitter.com/share"
  12.                class="twitter-share-button"
  13.                data-url="http://www.redmondpie.com/microsoft-black-friday-deals-discounts-on-xbox-360-windows-pcs-kinect-free-windows-phones-more/"
  14.                data-count="horizontal"
  15.                data-lang="en">Tweet</a>
  16.         </span>
  17.     </p>
  18.  
  19.     <script type="text/javascript">
  20.  
  21.         $(document).ready(function() {
  22.             twttr.events.bind('click', function(event) {
  23.                 console.log(event);
  24.             });
  25.         });
  26.     </script>
  27.  
  28. </body>

When i click on the button, the tweet edit interface appears, but instead of event object dump, some uncaught exception goes to a Firebug console.
http://img.200133883.info/serega/132223268508_kiss_107kb.jpg

This happens on most website with tweet buttons, for example dev.twitter.com
http://img.200133883.info/serega/132223293082_kiss_93kb.jpg

And not only in firefox. Here is in Chrome
http://img.200133883.info/serega/132223331370_kiss_321kb.jpg

I suppose that the problem is in this exception thrown, that's why the binded function is not called.
I want to believe that I simply doing something wrong, and there is an easy solution for my trouble.

My goal is to track tweet events in Google Analytics. Any help is so appreciated! Thanks.

2 years 21 weeks ago

Replies

MattMaxed
@MattMaxed Matt Maxwell

I believe that this is possibly related to the issue that some of us are seeing with the popup share (or any intent) button. Instead of the popup going away, and the event firing, a second version of the popup fires.

Since, in both cases, the exception/incorrect processing is happening entirely on Twitter's side, I don't think there is anything that we can really do about it, except to keep gathering as many examples of it not working the way it is supposed to.

2 years 20 weeks ago
episod
@episod Taylor Singletary

You're right that it's most likely related to that bug -- which should be resolved soon.

2 years 20 weeks ago