Request token, access token and signature in iOS5


#1

Hi everyone.
I’m Manu and I’m developing a Twitter-based iOS app.

I have been working with OAuth for some days and I don’t reach to understand how it works in detail.
On the one hand, in my app’s page I can get an access_token and secret. On the other hand, Twitter api docs give us some methods to obtaining access tokens, which are necessary to create the oauth signature, needed to sign each request once you have those access tokens.

My question is:
¿Are the access token and secret that appears in my app’s page the same I would get if I ask for them using “obtaining access_token process”?

If this question has been answered before, I would go pleased to that post, but I haven’t count it.
Thank you.
Greetings,
Manu


#2

The access token and secret which appear in your application’s settings page are specifically tied to your account. They’re equivalent to what you would get if you implemented the auth flow and went through it with the same Twitter user who registered the app.

If you application only needs to access Twitter data on behalf of a single account, then the keys in your application settings page are sufficient to start accessing the API, posting Tweets from that account, etc.

If you need to Tweet/read timelines/etc on behalf of other users, you’ll need to have those users complete the OAuth flow in order to get access keys and tokens tied to their accounts. Then you would have to pick the correct access token to use when making a request on behalf of a specific user.

Does that help?


#3

I should point out that iOS has functions which interface with the accounts which have been configured on an OS level, so it’s a little bit different than writing a web app, which would use the traditional OAuth flow. Make sure you read the iOS docs, which are located here: https://dev.twitter.com/docs/ios


#4

Perfectly explained and understood.

Many thanks, @kurrik.