Closed ePirat closed 8 years ago
Are you looking for -[STTwitterAPI oauthAccessTokenSecret]
?
I don't think so. I will explain what I am struggling with:
I successfully use the above mentioned method to get the URL to present to the user, the user grants my app access and is redirected into my app using the callback URL. Now my app opens and has to do something with the callback URL parameters in order to somehow obtain the oauth_token_secret, so it can do actual requests in behalf of the user. I am wondering how to do that.
It's very clearly documented for PIN (oob) auth flow, not really for the normal one using the callback url.
EDIT: I checked the docs again, it seems I was slightly confused about the exact tokens… There are just so many, sorry. What I am trying to do is described at "Step 3: Converting the request token to an access token" here: https://dev.twitter.com/web/sign-in/implementing
Ok, after looking into the iOS demo project, it seems that postAccessTokenRequestWithPIN:successBlock:errorBlock:
is what I should use, as this is what the demo project does here.
The only reason I was not using it, was that the name somehow suggests it is specific for PIN auth, which is kind of misleading.
I am wondering how to do a normal OAuth flow:
I am using the following code to obtain the necessary OAuth URL that opens in the Browser for the User to visit:
Now I am wondering, when the user is redirected to my App (which works fine), I get a
oauth_token
but I still need theoauth_token_secret
. Does STTwitter provide a method to obtain it? I was only able to find:The name suggest this is only for pin auth, but there is just no other for the non-pin based auth. Should I just use this method and pass the
oauth_token
as pin parameter?