I also have this issue with one of my applications. We are using an
automated twitter account to post updates as a Twitter feed. The OAuth
authentication process requires a user to be redirected to Twitter to
enter the username and password to authorize a request token in order
to provide controlled access to an application while keeping the
user's credentials secure. For these type of accounts we know the
username and password and so the OAuth process is superfluous in these
circumstances. The only way I can think of to do this, after Basic
Authentication is removed, feels a bit dirty but is as follows:

1) Call the request_token API method using the consumer keys
2) HTTP GET the authorize API method using the request tokens
3) Regex the resulting response to extract form variables and tokens
4) HTTP POST the action parameter of the form (make sure follow
redirects is on) including the extracted form variables, the username
and the password
5) Extract returned parameters from the response
6) Follow the remainder of the OAuth process

Is there a better method for doing this?

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to