Fix for wordpress twitter widget not loading or stuck on loading.
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:
- 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.
- We’ll be removing support for the public timeline: api.twitter.com/1/statuses/public_timeline.
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
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $twitter_username;?>.json?callback=twitterCallback2&count=<?php echo $show_num;?>"></script>
Change to this
<script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline/<?php echo $twitter_username;?>.json?callback=twitterCallback2&count=<?php echo $show_num;?>"></script>
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.


Pingback: Solución: Mi widget de Twitter no carga/ no funciona en WordPress » Emma Fernández
Pingback: Service Interruption - Meyerjg
Although ours is not a wordpress site, your solution still worked! Thank you so much for sharing!!!
Pingback: Fix for broken Twitter feed « fast fresh web
Worked like a charm. Thank you very much.
Thank you so much! This sorted my theme/twitter widget problems that have been giving me grey hair for past couple weeks!
Perfect! Noticed this on a few of my GoodLayers sites. Exact solution I was looking for. Thank you!
Thank you for sharing this! It worked perfectly!
Thank you. Just what I needed, been pulling my hair out trying to get the twitter feed to work, you’ve saved me from total baldness!
Pingback: Twitter Not Working in WordPress Blog : XtremePassion
Pingback: | Twitter API Solution |
It worked perfectly!…Thank you so much Clark.
Thank you so much, this worked like a charm!! Done in less than 5 minutes!
Perfect! Thanks. Have come back to this site twice for reference already!
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.