Tuesday, September 16, 2008

Netflix API Getting OAuth to work on iPhone - Instant Queue Add part 1: why?

Why develop an iPhone app? Its "the future", a useful skill, and I can carry whatever I develop in my pocket and make it do whatever I want.

I work at Netflix, and I have instant watching on my TV, I built an application "Instant Queue Add" that lets me add a title to my instant queue using my iPhone in a couple of touches. It takes the Top20 and New Choices RSS feeds to find content, and it spawns a copy of Safari to add to instant queue for each pick. The first time it starts, you have to login, then it remembers the Netflix cookie. However I really want to add more features and avoid spawning a copy of Safari with a screen scraped URL.

The Netflix API uses a new standard called OAuth for Open Authentication. There are lots of features, but its complex, and there is no standard off the shelf library for OAuth on the iPhone. However it is a useful building block for more advanced applications.

In this series of posts, I will document the steps I'm making to get OAuth to work on the iPhone using Objective-C and Xcode. My starting point is this code base and tutorial by Jon R. Crosby, which is based on desktop MacOS X, and doesn't directly support the iPhone.

No comments: