Twitter API - OOB Stream

I am developing a mobile application that needs access to Twitter. There's a ton of documentation regarding using the Twitter API with web apps, but it's hard for me to find the right stream or any examples using out-of-band / PIN mode for desktop and mobile apps.

Can someone give me a link or some code examples (preferably in C #) that can show me how to use the Twitter API from a desktop or mobile application?

Thanks.

+6
c # twitter
source share
1 answer

In the Glossary section below http://dev.twitter.com/pages/auth

There is a description of the OOB stream.

out-of-band mode . Instead of providing a URL-based callback, "oob" is provided when receiving the request token. After the user has provided Twitter with their credentials, they are presented with a screen containing a PIN code, and they are asked to enter this code into the application. The application then sends this PIN as oauth_verifier to the access token step to complete the exchange.

What does this mean in practice, compared to a regular network stream:

  • In step (A), your application launches the stream, opening a browser window for the OAuth stream, but sends the request parameter oauth_callback=oob , not the callback URL
  • Step (C) ends with Twitter displaying an authorization result page containing a PIN for the user (instead of making a callback in your application with a regular web stream).
  • Step (D) requires the user to copy / enter the PIN code from the Twitter authentication page into your application (for this application, some kind of "Waiting for authorization ..." screen is needed):
  • Step (E) your application sends the PIN entered by the user to Twitter in the oauth_verifier parameter to get the access token.

Try the OAuthConsumerWpf sample at DotNetOpenAuth http://www.dotnetopenauth.net/ for an example OAuth user code that you can change.

+10
source share