I noticed recently that the twitter box in the sidebar of my site wasn’t showing my twitter feed; but instead, showing an annoying message ‘No public Twitter messages’. I searched online for a fix, but most of the fixes online are very old (2 Years +) and when I tried them they didn’t work, most recommend just using a different plugin, but this wasn’t a good solution for me since my theme requires it. So I thought the easiest thing to do would be to fix the plugin!
I done some research on the twitter RSS Feeds and noticed that Twitter changed the way they allow people to access their RSS, they used to have it in a format like this:http://twitter.com/statuses/user_timeline/Ricky_Dawn.rss.
However they now recommend using a thrid party solution to pull in your feed or using their API; which is easy enough, this URL will allow me to fetch my own RSS feed: http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=Ricky_Dawn as you can see it works well.
The URL the plugin is trying to pull the feeds from is still the old style, so all you have to do is simply swap them around, follow the below steps if you’re not sure how to do this:
- Go to your installed plugins list, find ‘Twitter for WordPress’ and click ‘Edit’ next to the ‘Deactivate’ link.
- scroll down until you see this code:
1$messages = fetch_rss('http://twitter.com/statuses/user_timeline/'.$username.'.rss');
- Replace the above code with the below code, make sure you replace my username (Ricky_Dawn) with your username and click ‘Update File’:
1$messages = fetch_rss('http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=Ricky_Dawn');
Go back to your website and you should see your twitter feed!