Help! My Twitter feed isn’t working!
On the 11th of June, Twitter deprecated version 1 of it's API and encouraged users to update applications and websites to use the newest version, 1.1. This means that websites which hadn't already been updated to use the newest version would no longer display tweets and instead would throw an error:
What is the Twitter API?
Twitter has tools which allows tweets to be shown in places other than the Twitter website - for instance, on websites or in Android or iOS apps. The tools which allow websites or applications to interact with Twitter are known as an API.
Why has it been deprecated?
The API has been around for quite a while - version 1 (the version which has been retired) was launched in 2006. APIs tend to have new functionality added to them on an ad-hoc basis depending on what the users of the API ask for, so it's not uncommon to get to the stage where maintaining an API takes a lot longer than it should because of the additional functionality. Once an API gets to this stage, a lot of companies decide to completely rewrite and redesign the code - the new API will be easier to maintain (since it's written with all the functionality in mind, rather than having things tacked on).
A large rewrite of the API will mean that the new version is no longer backwards-compatible - i.e. external websites and applications using the older API won't be able to use the new one unless they are also rewritten. At this point, the company creating the API has two options:
- Maintain two APIs indefinitely so websites and applications using the old API don't break; (this would result in a large increase in work - maintaining the old and new APIs!)
- Switch off the old API and get everyone to change to the new one.
Twitter has taken option two - they've removed access to the old API so everything now needs to use the new version. This wasn't a sudden change - Twitter did give several months' notice - although it has caught a number of developers out since the notices weren't especially well-publicised.
What can I do?
There are a few options to replace non-functioning Twitter feeds:
Use a Twitter widget
Twitter has provided several different widgets which can be embedded in websites - the user timeline (displaying tweets from a single user), favourites, lists, and search (which shows tweets matching a certain phrase). These widgets are quite limited in how they can be customised - the Twitter branding features prominently - so may not be suitable for all sites.
Create an app
Creating an 'app' through Twitter is the way to get the functionality most similar to how a lot of sites were using Twitter feeds (including Gravitywell's!) - it's possible to get a user's stream and display the content in a non-branded way. However, creating an app is far more complicated and limited than just using the API - developers will now need to integrate OAuth (a method of logging in to Twitter from a website) to fetch anything from the API. Apps are rate limited; only a certain number of requests can be made per hour. On a high-traffic site, this will quickly be reached unless tweets are cached, at which point up-to-date tweets won't be displayed until the cache is updated.
If Twitter's own embeddable widgets aren't suitable for your site, and creating an app would take too long, you could always consider removing the feed from the site entirely, and possibly replace it with a link or contact information.
Why has Twitter made these changes?
Twitter has recently launched a crackdown on branding - it has released a number of display documents outlining precisely how tweets must be shown in external websites and use of Twitter's branding. The old API allowed streams or tweets to be gathered as plain text, so websites could style them however they wanted; however, the new API makes this much trickier.
To get the same effect as using the old API, developers now need to create a Twitter app, which requires a lot more code has a number of limitations - specifically, how often tweets can be loaded per hour (once the limit is reached, no more tweets will be shown).
This limitation also affects third-party apps such as those used on Android and iOS along with desktop clients. The changes to the API seem to be encouraging people to use the official Twitter website or apps where Twitter has complete control over streams (so for instance, promoted tweets or adverts can't be filtered out as some third-party programmes were doing). The widgets Twitter provides also give Twitter control over layout and streams since they're essentially small sections of the Twitter website shown on the embedding site. These widgets also allow Twitter to track user behaviour similar to how Facebook gathers information - each widget embedded on a site send information back to Twitter about the sites you visit (and therefore the things you like), which is valuable to advertisers.
Essentially, the API changes seem to point to Twitter trying to find a way to make money - external applications are far more limited than before, and Twitter's branding is far more prominent than before. Both of these changes suggest that Twitter is trying to take more control over where content appears and how it looks, which is important in preventing adverts or promoted content from being filtered or altered in any way.