Twitter widget not loading on WordPress UPDATED June 2013

Fix for wordpress twitter widget not working or stuck on loading. UPDATED June 2013

Wordpress Twitter Widget Not Loading

The Twitter API v1 has been retired, and this means some functionality has been removed. As of now all twitter widgets need to be properly authenticated with OAuth as Basic Auth has been disabled. This breaks most of the Twitter widgets we use. The easiest fix now is to replace your twitter widget entirely. I recommend using the Really Simple Twitter Feed Widget.

Once the Really Simple Twitter Feed Widget is installed you need to configure it with your OAuth keys. To get these keys go to https://dev.twitter.com/apps and sign in using your twitter account. Here you will need to create a new app for the widget. Create the app and it will generate the keys. Then Click the Create Access Token button and then refresh the page to get the Access Token. Fill out the WordPress widget settings with the keys and your twitter username and everything should be working.

If you use seaofclouds / tweet jquery.tweet.js check out Stan Scate’s fix here: https://github.com/StanScates/Tweet.js-Mod

The Twitter API has been recently updated and this started to affect some of our WordPress websites that use the GoodLayers Twitter Widget. The problems arose because of these changes to the Twitter API posted by @kurrik:

  • All non-versioned API endpoints will go away. Though you may occasionally find these endpoints responding as we ramp down, expect them to be gone in two weeks. This list includes:We’ll be removing support for the public timeline: api.twitter.com/1/statuses/public_timeline.
    • All API endpoints on www.twitter.com and twitter.com.
    • Endpoints on api.twitter.com without /1, /1.1 or /oauth in the fully qualified URL.

This caused the Twitter Feed to not load. The fix involves tweaking one line of twitter-widget.php

/wp-content/themes/XXXXX/include/plugin/custom-widget/twitter-widget.php (This plugin came packaged in the theme)

Find this line

Change to this

The api subdomain has been added to the src string as well as versioning (1). Version 1.1 of the Twitter API will be rolling out in March 2013.