Tweet Event not working after new button

events
tweetbutton

#1

Hello, I have been using
twttr.ready(function (twttr) { twttr.events.bind('tweet', clickEventTweet); });

in order to send the event ‘clickEventTweet’ after a tweet is sent. After the new changes to the button, the event gets sent only after the tweet button has been clicked and not after an actual tweet has been published. Is this only happening to me, or have other people noticed?


Twitter Cards for Web (basics)
#2

The tweet event behavior changed to fire on click as of November 20.


#3

So are you saying there will never be a way to do an action after someone tweets? Is this set in stone, or will the developers be open to implementing something like this in the future (if enough have requested this)?


#4

As covered in the announcement, the communication bridge needed to log the completion event is not available most of the time.

An iOS 9 or Android M user with the Twitter app installed will be taken into the app to compose a Tweet when clicking on a Tweet web intent. A mobile web browser does not maintain communication between tabs for the completion event to be logged. A communication bridge between Twitter’s widgets JavaScript running on your webpage and the location of the completed Tweet doesn’t exist to trigger the event on completion.


#5

So there is absolutely no way for an option to do this? Is there a way we can at least try and hack this so if we detect website, action does after tweet, if it detects mobile, action is done at button press?


#6

Hi Mendie,

As I said in the original post, it’s really important that an interface like this behave predictably, and unfortunately the reality of browsers and apps interacting across modern platforms means having to do something simpler but consistent, rather than unpredictable and unreliable.

We did consider some more complex ideas, including some where maybe events would fire at different times depending on the environment, but concluded that that unpredictability would make the API harder to work with, confusing to learn, and even then not reliable. The new mobile OS behaviors for invoking the Twitter app aren’t detectable from a web context (we can’t know if the app is installed) so at the time you click we just don’t know whether the web interface or the app interface is going to pop up. It’s not as simple as desktop vs. mobile.

If mobile operating systems implement a way to send messages between apps and the web, I would personally be keen to restore the original scope of the feature: It was pretty cool. But we can’t do that today, and a broken API is worse than a simple one.

Thanks,

Ben


#7

Now this new implementation ruined my website functionality… hope Twitter could bring back the old button where we can detect if the user really tweeted my page or else I will have to remove the twitter button from my site =(


#8

Hi Rommer,

What functionality are you currently trying to achieve with the event? My general hope with the event hooks is that most user experiences should have a negligible change with the different event timing.

When a button is clicked a user will still have a modal interaction to take an action (either desktop pop-up window, new mobile tab/page, or mobile app), so when the user returns to the page (after either closing the pop-up, or switching back to their browser app) any user interface that would have changed for posting the Tweet will still have taken place.

I’m happy to explore what you’re trying to do and help fit it into the simpler model.

Thanks,

Ben


#9

It’s just a simple counting of tweets, where I count every user who tweeted my page then save it to my database. My problem is, I can’t detect if the user really tweeted my page because they can close the popup even without clicking the tweet button inside the popup.


#11

For me, I reward users who tweet their experience on my site. I can’t really reward anyone now since they can just press the button, and get the reward without really tweeting.


#12

Rommer and Mendie,

I’m afraid for both of your cases intent events can’t provide exactly what you’ve been trying to use them for, but the change in implementation was made because users of the web platform shifted such a way that events were already broken for your use case. Users who were being taken into apps, or using Chrome for iOS, or some versions of Internet Explorer made up half the widget usage. None of those users were reliably sending tweet events, even if they Tweeted.

The change we’ve made concedes that we can’t reliably provide that “completion” event any more, and means that you will get a reliable signal for everyone who at least starts or attempts the interaction. We won’t offer an API that only works half the time, with reliability characteristics that are undetectable.

The closest you can do now is record this “intention to Tweet” for your analytics or rewards, but know that it will be triggered for all the users of your site.

Ben


#13