Unbreaking our Twitter


See this Scripting News post for background.

Getting pragmatic

It seems that all the breakage is described in this post from March of this year.

A few URLs change, and maybe they no longer return XML and prefer JSON. And they're warning about turning off some other stuff in the future.

These are the items that concern us:

"OAuth 1.0A operations must be performed on the api subdomain. Older http://twitter.com/oauth/* paths will cease to be functional."

"All non-versioned API endpoints, such as http://twitter.com/statuses/user_timeline, will cease functioning."

I'm only maintaining those bits that are needed to keep Radio2 working, first -- and if that was easy enough, I'll also maintain the bits needed to keep Microliner working. My assumption is that eventually Twitter will fully break us with no recourse, so this is just buying us a bit more time. How much, unknown.

What we're doing

In user.twitter.prefs, change http://twitter.com/ to http://api.twitter.com/1/ in every url. These changes unbroke both Radio2 and Microliner. Screen shot.

For example, user.twitter.prefs.posturl changed from http://twitter.com/statuses/update.xml to http://api.twitter.com/1/statuses/update.xml.

I tested the oAuth function in Microliner, and it appears to still work. But I'm going to change teh URLs here anyway. The problem is that they are in at least three places. In Microliner, in system.verbs.apps.twitter and radioReallySimpleSuite.data. In the unlikely event that anyone else is using oAuth in Twitter in OPML, they will have to at some point change their URLs as well. In this case all we have to do, it appears, is change the domain in the URLs from twitter.com to api.twitter.com.

I tested the oAuth function in Radio2, after changing the URLs on the server, and it appeared to work.






Posted on Thursday, October 11, 2012 at 6:02 AM by Dave Winer.