Best Support Ticket Ever Claiming Twitter’s API Is Pulling Tweets From The Future

With alerts set up for certain keywords and phrases – and one searching for “Twitter API” issues, there are interesting results from time to time. And man, did it surface the BEST support ticket ever today.

There’s really no good way to summarize it, so you’ll find it in full below. Thank you for this, @timebot. Thank you.

From the bug report ticket titled “Twitter API returning results that do not respect arrow of time,” we share the best Twitter API support ticket ever:

This will take some explaining.

It started as an afternoon hacking project with your Twitter API. I was inspired to make it when one of my new followers reposted something I’d said months ago. This happens from time to time and it always makes me feel vaguely vertiginous. Twitter is meant to be about the “now” and these intrusions from the past are like being at a family reunion and some aunt asks you how the girl you were dating in high school is doing.

As a learning project/prank, I decided to impose that feeling on my friends. The idea is simple: I made a Twitter bot that scrapes their twitter feeds. It picks some of those tweets—at random—and stores them. It holds them for 3 weeks to 6 months and then it posts them, being sure to mention the original author’s @name.

I called it @timebot. I set it running just over a year ago.

For the first few weeks it sat silently, scraping. When it finally did start tweeting, I couldn’t have asked for a better reaction. At first, no one really noticed, though Sandra blocked it as spam. Then, through some stroke of luck and/or a bug in my random number generator, it retweeted James three times in a row.

“Looks like I’ve got a new stalker. What’s up with @timebot? #annoying” he said.

“@jamesisbest Whoa! Look at @timebot’s timeline. It’s only retweeting us! #weird #stalkerbot” said Samantha.

“@SamanthaTom @jamesisbest WTF. This SUPER CREEPY #stalkerbot” said Allison.

At this point, I fessed up. We all had a good laugh, and it was generally agreed that we should keep @timebot around as a mascot for our little group. Only those who were “in” would get followed by @timebot.

That was that, until James noticed a problem.

“Yo @carzymoney,” he said, “I think @timebot’s got a bug in the link code. #learn2code”

It was a post by Allison. Nothing special, something like “Mmmm tasty lunch” with an image attached. The image was a broken link. No big deal. I tried to find the original tweet but there was some problem with the unique ID and you don’t make it easy to page through past tweets. I’d have given up if I hadn’t noticed the timestamp.

The timestamp was in the future. Two days in the future. Weird bug. But @timebot was always a side project and I was on some big deadlines.

Two days later, Allison decided to go to our favourite sandwich shop. I don’t know the details of what happened. But I do know that at 12:23:51pm on October 3rd, @allililly tweeted “Mmmm tasty lunch” with an image attached and no broken link. The timestamp matched. The unique ID matched. The formerly broken link in @timebot’s message now worked. I got that vertiginous feeling again.

To keep things simple, I’ll spare you the details of the next occurences, or of the time an errant tweet nearly broke up Sandra and her girlfriend. Let’s just say that I’m convinced that, somehow, @timebot is pulling not only tweets from the past, but tweets from the future.

After a thorough review, I can point to the spot in my code where a bad calculation expanded the scope of the search to days after today’s date, but I cannot tell you how it’s possible that the thing returns results. The fault there lies with your API. James thinks it’s because all our tweets are being stored by the Library of Congress. He says the information density of that place warps space and time. I say he’s crazy.

I might be crazy too, because a sane man would have probably fixed the bug and kept their little mascot running as a private joke between friends. I choose instead to expand the search. First, I turned off the date restrictions entirely. Second, I changed the followers array so that instead of pointing to our little list, it pulls from the master feed. I set @timebot to drink from the firehose.

The results are worse than useless. Because of your rate-limits, I can only grab so many messages per day. All I get are tantalizing glimpses. Most of what’s said is garbage. It’s random and very personal, as useful as knowing that Allison will have a sandwich some day. Many more are links to articles that don’t yet exist, so all you have to go on is some linkbait headline. Others messages, stripped of all context, contain barely any meaning at all.

For example, I know that on November 12 2015 at 3:45:41, @justinbieber is going to say “I’m so, so, sorry.” Why? I have no idea.

What’s worse is you can’t trust what you read, because people are sarcastic, or making a parody or just engaged in wishful thinking. I have seen tweets from after the 2016 election that seem to put @BarackObama back in charge and others that seem to have @RonPaul at the helm.

In the hopes that access to some longer messages might provide some context or better information, I have tried porting my code to Facebook and Google+. But Facebook’s notorious walled garden has reared its ugly head and Google’s API isn’t doing anyone any favours. I have had no success in either domain. James says this confirms his Library of Congress theory. I say he’s still nuts.

For now, I’m keeping things quiet. When I can I’m working away at this. I’m trying to reach out to some computational linguists, to see if there’s a better way of analysing what little glimpses we are getting. Perhaps if nothing else, it will help them chart out the future drift of language. I’m also hoping that Twitter will allow me to up my hourly API calls limit, so I can grab more data. So far, you haven’t returned my emails and I’m left groping around in the dark. I’m hoping that I’ll have better luck with this form.

I will say that I’ve yet to see any tweets with a date later than January 12, 2017.

I don’t know why.

Have something better to share? Send a tip at the top of the page or hit the comments!

(Image from Shutterstock)