On 8/15/10 1:11 AM, artguillotine wrote:
> I have an application already created in php that access' twitter.
> There is a big switch to OAuth coming this week.  How hard is it to
> add OAuth to an existing application and is there any examples or
> previous discussions in the groups?  Do I have to rebuild the
> application or would I simply need to add an authorization key?
> Any help is greatly appreciated.
> GB


That completely depends on your current structure of the application. I
have seen applications that implement the same Twitter code again and
again, and people who do that will have trouble moving to OAuth.
However, other people (like myself, although I've never worked with
Basic Auth) prefer "wrapping" all their Twitter stuff into one class,
and for these people it is easy to make the move.

I can write complete pages about how to move from Basic Auth to OAuth,
but this is a summary :
# Instead of sending user:passw...@api.twitter.com, you send an
Authorization: header. This header is dependent on the request you make,
so you cannot cache the header.

# Re-write the login procedure to use the three-legged authentication
structure which OAuth provides. Web Applications do not get permanent
access to xAuth - if you are lucky you will get xAuth for a day to
change all credentials into OAuth tokens.


Reply via email to