AwesomeSanjay
AwesomeSanjay

Reputation: 23

How to use PIN in desktop application code to fetch data from Twitter

I'm very new in oAuth.

I'm writing a desktop based windows client for Twitter APIs. When I'm using value "oob" for oAuth.CallBackUrl. At the time of authorization, I get a PIN (i.e. 75940xx). please help me finding, how shall I use that PIN in my application code to be able to fetch data from Twitter.

An example would be much appreciated.

Upvotes: 2

Views: 331

Answers (2)

Chris Mowforth
Chris Mowforth

Reputation: 6723

The PIN replaces the oauth_verifier string. When exchanging a request token for an access token, use the value of the PIN for the oauth_verifier.

Upvotes: 1

Stephen Dryden
Stephen Dryden

Reputation: 571

There are 3 main steps in OAuthentication. By the sounds of it you have completed the first two. See below for summary of steps.

  1. Request Token Key and Token Secret
  2. Use Token key to grant application access to data. (if this is successful the user will be provided with a PIN
  3. The PIN is then used to exchange the Token Key and Token Secret for an Access Key and Access Secret. The Access Key/Secret are used to access the users data

For a more detailed OAuthentication flow see this link. I would also recommend reading the OAuth RFC. I hope this has been helpful.

Upvotes: 0

Related Questions