Today was a perfect example of how often times the best way to learn how to do something is to be faced with it as a problem. I noticed that my tweets weren’t appearing correctly in the sidebar of my blog. Only my tweets were showing up, none of my retweets. I searched and read and even tweeted to twitter asking for help. It turned out that even though I was doing things correctly I was requesting my tweets using an old, now unsupported, URL. I switched to the new URL and everything was showing up as it should.
While I was reading up on how to use the new URL I noticed that there were rate limits on timeline requests. This explained why I would often end up with nothing to display, even though twitter was up. In their infinite wisdom Twitter suggested that developers use caching so they wouldn’t exceed the rate limit. Great, how do I go about doing that?
They had no examples, but after some searching I found a few people who had done something similar to what I wanted, but none of them were doing exactly what I needed. After polishing up on my programming skills and teaching myself some new tricks I’ve now got my tweets and retweets showing up as I’d like them too, but they’re also caching locally so I shouldn’t hit any rate limits and if twitter does go down, the last available tweets will still show up so I don’t have a big empty box where they should have been.
Had I not run into that peculiarity this morning I never would have bothered to learn more about how Twitter worked, I would have been content to just copy paste the example I’d found online a few weeks ago. With my new knowledge I’m looking into updating an old badge I’d made and possibly cooking up a few new widgets. See? I told you I was all about twiddling the knobs…