views:

53

answers:

1

The long QUEST to get an access token

  1. app gets a request token from twitter
  2. user clicks a button on the ap
  3. app opens a twitter page, user types username/password
  4. twitter gives user a PIN
  5. user use this PIN in the application
  6. GREAT, finally app exchange the request token for an access token

Questions:

This token belongs to who? I mean, i don't even know his username!
The user will have to repeat the steps above every time?

I can't figure out how to fit this into a real application.

Thanks in advance.

+1  A: 

Once you have the token, you can call the account/verify_credentials endpoint, which will return you the User profile that the token belongs to (also confirming everything works as intended).

You can then associate the twitter account and the tokens and store the token locally. (They are good forever unless the user later revokes access for your app). How you manage stored tokens depends on your app platform, your needs, etc.

Jason Diller
complement: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/2bbf877c4ea8b139
arthurprs