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
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.