Search code examples
vb.nettwittertwitter-oauthtwitterizer

Twitterizer 2; Argument null exception


I 'm a newbie to twitter api/twitterizer. I get the following exception for the code shown below. The error occurs when i request access token. Any suggestion on how to fix this?? I downloaded the latest dll(2.3.1) from the twitterizer website.

{"Value cannot be null. Parameter name: String"}

 Dim OAuthTokens As New OAuthTokens
    Dim accessToken As New Twitterizer.OAuthTokenResponse
            accessToken = OAuthUtility.GetAccessToken(ConsumerKey, ConsumerSecretkey, "oauth_token", "oauth_verifier")

thanks


Solution

  • As I said on the forums, the oauth_token and oauth_verifier are given to you in previous steps of the authorization process. Calling the GetAccessToken method is the last step in the process.

    Here's an over-simplification of the steps:
    1. Get a request token
    2. Send/Redirect the user to the authorization/authentication url
    3. (The user logs in, grants you access, and Twitter directs them back to your application)
    4. Exchange the request token for an access token