Twitter Broke Our WordPress Widget

Illustration of Twitter Bird Wrecking Havoc

As many of you might have noticed, our Twitter widget in the footer is empty now.  That’s because Twitter broke our WordPress widget.  This makes me sad :'(

Unfortunately, we’re not the only ones affected by the recent changes to the developers API made by Twitter on June 11th, 2013.  The social media behemoth deemed it necessary to deprecate the REST v1.0 API that was widely used across the web for retrieving user tweets.


What Exactly Does This Mean?

Well, if you’re an end-user, probably not much.  I suppose it depends on how you utilize Twitter, but most people will be unaffected by this.  Developers like myself though are deeply affected by it and personally, I feel that this really sucks.

Every developer who wrote a Twitter widget to throw in their sidebar has now had their widget rendered useless and this extends beyond WordPress developers as well.  I’m sure that there are Drupal or Joomla sites out there with similar widgets and those would almost all be affected.  I can’t imagine that anybody would have used OAuth for their widget before the REST API was deprecated as all it does is add another layer of complexity for the end-user.

Our own widget (written by myself) took the Twitter feed, cached the results using transients, then in the widget interface we could set how many recent tweets we wanted to spool up.  In the future I was going to integrate rotation to it and then I had planned on releasing it publicly.  Now we need OAuth.


What Is OAuth?

From Wikipedia:

OAuth is an open standard for authorization. OAuth provides a method for clients to access server resources on behalf of a resource owner (such as a different client or an end-user). It also provides a process for end-users to authorize third-party access to their server resources without sharing their credentials (typically, a username and password pair), using user-agent redirections.

Still confused?  I don’t blame you, but let me try and clear this up.  Essentially, Twitter is now requiring users to authenticate with OAuth to retrieve their own tweets if you want access to the raw data.  You can still embed single tweets directly, but this must be done manually for each tweet and you won’t have any control over how the tweet is formatted.  An embedded tweet looks like this:

For most people this probably won’t matter too much, but for developers and designers this is a big deal.  There were literally dozens of WordPress Twitter widgets available in the repository and that doesn’t even cover all of the other CMS’s and software that utilized the REST API v1.0.  All of these are now broken!


What Can We Do About This?

Well, this is where it gets tricky.  To write a Twitter widget utilizing OAuth, this adds complexity to the widget and will likely frustrate end-users because it will now require them to go to Twitter and retrieve an API key.  I can’t imagine the average blogger will want to go through the hassle of wanting to do this.  I’m a developer and I don’t want to go through with the hassle.

I am planning on integrating OAuth into the widget I already wrote at some point soon, but I doubt we’ll release this widget for public consumption.  Perhaps, but it’s looking highly unlikely.  When I do this, I’ll also update this post to include the changes I made to the code so that you can do it for your own widget as well.

So for the time being, we apologize for not having our tweets on the website as we used to.

Tags: , , ,

Article written by Mike Smith

7Articles Mike Smith on LinkedIn | Email Mike Smith

Mike is the Electronic Media Director and Site Administrator for Frontera Marketing Group. Since building his first website in 1996 using animated GIFs of flaming skulls on GeoCities, he's graduated to advanced HTML5/CSS3 techniques and is well versed in front-end design and back-end development with PHP/MySQL. When not building websites, Mike likes spending time with his family, playing video games, writing articles about technology, photography, and building custom computers.

Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>