I'm working on version 2 of Twitterizer, a .NET library for using the
Twitter API, but I've run into a weird issue with pin-based OAuth. I
have a sample web application and a sample desktop application. From
the web application I am able to perform pin-based authentication
without any issues, but through the desktop application every call for
access tokens are refused with "Invalid oauth_verifier parameter."
I've stepped through the code (non-stop for an hour) and I'm sure that
the exact code is executing for each call. I've tried changing the
calls to GET, instead of POST, and the results are the same. From the
web app it works great, from the desktop app, not so much.

Using fiddler, I've captured the HTTP request/response from each, and
they look exactly the same (to me).

Here is the call from the web application (works):
POST http://twitter.com/oauth/access_token?oauth_verifier=2068385 HTTP/
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Twitter
User-Agent: Twitterizer/
Host: twitter.com

And here is the call from the desktop application (does not work):
POST http://twitter.com/oauth/access_token?oauth_verifier=541907 HTTP/
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Twitter
User-Agent: Twitterizer/
Host: twitter.com

The response body is:
<?xml version="1.0" encoding="UTF-8"?>
  <error>Invalid oauth_verifier parameter</error>

This may be more of a .NET question, as there may be some kind of
nuance when making requests through a windows application, but I
thought it might be worth my time to ask everyone, in case I'm doing
something dumb (it happens).

Thanks for your time,

Reply via email to