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.

24 thoughts on “Twitter widget not loading on WordPress UPDATED June 2013

  1. The solution worked perfectly for me. Although, I ended up installing a different Twitter widget called Tint ( http://www.tintup.com ). It looks better than the default twitter widget IMHO and lets you customize the look to more closely match your own site.

  2. I can’t find that PHP file anywhere in the theme the website I maintain is using. (Backstreet) Nor is it in the twitter tweets box plugin we have.

    1. This post referes to the goodlayers twitter widget, you may have a different plugin installed so the file may be named differently and in a different location. Check your wp-content/plugins folder. And so you know Twitter recently retired the API v1 in June and this has broken many widgets the fix in this blog post no longer works. See this post (API v1 Retirement)

  3. Hi, anyone noticed that this fix has stopped working, I have several sites with this update but are now not working. Thanks

  4. Thank-you Clark Comms for solving the Twitter feed solution. Just installed your recommended widget; Really Simple Twitter Feed and it works as the previous widgets did. I’ll still need to change my theme. Thanks guys..

  5. Pingback: maillot de foot
  6. Thanks so much for these instrucitons-I managed (finally!) to make it work. But now I can’t seem to adjust the font size-it’s very tiny and scrunchd and I’d like it to look more consistent with the rest of my blog:

    http://www.realdelia.com

    I’m currently trying to sort this out with WordPress support forums but thought you might have a quick fix. I do not understand the code/style sheet info above (sorry, I didn’t create my site!) so if you could decipher that and it’s easy I’d be happy to take a whirl…

    many thanks
    Delia Lloyd
    http://www.realdelia.com

    1. Hi Delia,

      Basically to adjust the appearance of your tweets you need to modify you stylesheet (CSS). To do this log into your wordpress dashabord and click the “Appearance” menu item and then click the “Editor” sub menu item (under Appearance). This will bring up and editor with your style.css file which is you main stylesheet for your theme. Scroll down to the bottom of the file and insert a new line and then you can copy the following code and paste it in then press save. This code will modify the style for the twitter feed list on your homepage.


      ul.really_simple_twitter_widget li {
      border-bottom: 1px dotted #ccc;
      padding: 20px 0 15px;
      font-size: 12px;
      }

      These settings will make your tweets more consistant with your theme by adding a dotted border between each tweet and adding some padding (white space). You can adjust the font size if you wish.

      Thanks for stopping by and good luck !

Leave a Reply

Your email address will not be published. Required fields are marked *