Home > Archive >  2009 >  February >  12


Connecting with Twitter using OAuth

Thursday, February 12, 2009 by Dave Winer.

Okay, so the easy part of OAuth is done, I have it connecting to the demo server. Now comes the part where I try to use it to control Twitter. That part, no surprise, isn't working -- yet. I will get it to work. I'm determined. ;-> Permalink to this paragraph

This much does work. Permalink to this paragraph

1. I am able to get a request token. Permalink to this paragraph

2. I am able to direct the user to the page where they give the OPML Editor permission to use my account, and I am able to give the OPML Editor that permission. Permalink to this paragraph

3. The OPML Editor, waiting in the background, polling Twitter, determines that it has been given access, and saves the access key and the access secret in the database.  Permalink to this paragraph

A picture named accordion.gifAll that happened in 5 minutes, so I was fairly confident that the next step would work, but blam I hit a brick wall and stopped right there. It's insisting that it cannot authenticate me. Permalink to this paragraph

4. Here's what I want to do, I want to ask Twitter for my friends' timeline. Before OAuth, you'd make a request of this URL, with nonsecure HTTP authentication, and it would return an XML structure that contains information about recent status updates from the people the user is following. I make the request using the same code I used to make the request of the Irish server, the request that worked, but I get back the following result from Twitter: "Invalid OAuth Request."  Permalink to this paragraph

I'm doing something wrong but damn if I know what it is! ;-> Permalink to this paragraph

PS: Here's the current OAuth app table, for the gutsy Frontier programmers. Permalink to this paragraph




     

Recent stories:



A picture named dave.jpgDave Winer, 53, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software; former contributing editor at Wired Magazine, research fellow at Harvard Law School, entrepreneur, and investor in web media companies. A native New Yorker, he received a Master's in Computer Science from the University of Wisconsin, a Bachelor's in Mathematics from Tulane University and currently lives in Berkeley, California.

"The protoblogger." - NY Times.

"The father of modern-day content distribution." - PC World.

One of BusinessWeek's 25 Most Influential People on the Web.

"Helped popularize blogging, podcasting and RSS." - Time.

"The father of blogging and RSS." - BBC.

"RSS was born in 1997 out of the confluence of Dave Winer's 'Really Simple Syndication' technology, used to push out blog updates, and Netscape's 'Rich Site Summary', which allowed users to create custom Netscape home pages with regularly updated data flows." - Tim O'Reilly.

http://twitter.com/davewiner



Dave Winer Mailto icon


My most recent trivia on Twitter.



© Copyright 1994-2009 Dave Winer Mailto icon.

Last update: 2/12/2009; 5:51:25 PM Pacific. "It's even worse than it appears."

Click here to view blogs commenting on  RSS 2.0 feed.