My Twitter Widget Isn’t Working!!
Dude I fought with my Twitter account thinking it was set to be on private and not public. Then I thought maybe it was just an update I made to my WordPress build. After fighting with 4 different websites that I maintain for clients I realized that Twitter had changed their API code. I must have sifted through dozens of forums and blog postings all dating back 3 to 4 years ago! I couldn’t find an article posted on this in 2012 until searching through a forum and seeing a glorious link at the bottom of the page.
So I will share with you the secret line of code I found that is needed to be changed in order to get your widgets to work in WordPress or any HTML based code for that matter.
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
Click to View Code
The code above will also work if you are working with a theme where the Twitter widget or functionality is built into the theme. Instead of going into the plugin folder on the server you will be going into your themes folder and searching for an asset php file labeled widgets or twitter.php. The code will be slightly different but mostly you just need to search for the twitter URL and copy and paste the above.