title: Twitter OAuth update.json sending back "Could not authenticate with OAuth" (Using AS3 OAuth Library)
body: <p>I'm currently using the org.iotashan.oauth.* package (https://github.com/iotashan/oauth-as3/tree/master/src/org/iotashan/oauth) to handle my Twitter OAuth in AS3/Adobe AIR. I am using HTMLLoader to load the allow permissions dialog and listening for location change events to get verifiers, queue up to authorize tokens, etc. I've gotten authentication to work and got Twitter to successfully send me a token as well as successfully authorize the token for an access token. But when I try to do a test post, I keep getting the following error. Here is my event handler for successfully getting the access token:</p>
  
  <pre><code>    protected function handleTwitterOAuthAccessTokenLoadComplete( evt:Event ):void
      {
          _twitterAccessToken     = OAuthUtil.getTokenFromResponse( evt.target.data );
          trace( "THE ACCESS TOKEN:", _twitterAccessToken.key );
  
  
          //Code to send out a test tweet to logged in Twitter user's account
          var oauthRequest:OAuthRequest = 
              new OAuthRequest(
                  OAuthRequest.HTTP_MEHTOD_POST, "https://api.twitter.com/1/statuses/update.json", 
                  {},
                  _twitterOAuthConsumer, _twitterAccessToken
              );
  
          var request:URLRequest = new URLRequest(oauthRequest.requestURL);
          request.requestHeaders.push( oauthRequest.buildRequest( _twitterOAuthSignature, OAuthRequest.RESULT_TYPE_HEADER) );
          request.method = URLRequestMethod.POST;
          request.data    = new URLVariables( "scope=hello" );
          var urlLoader:URLLoader = new URLLoader();
          urlLoader.addEventListener( Event.COMPLETE, function( evt:Event ):void
          {
              trace( evt.target.data );
          } );
          urlLoader.addEventListener( IOErrorEvent.IO_ERROR, function( evt:IOErrorEvent ):void
          {
              trace("ERROR");
              trace( evt.currentTarget.data );
          } );
          urlLoader.load( request );
      }
  </code></pre>
  
  <p>The error I get from the server is:</p>
  
  <pre><code>{"error":"Could not authenticate with OAuth.","request":"\/statuses\/update.json"}
  </code></pre>
  
  <p>I checked the header that is being sent, and it matches pretty much what the Twitter OAuth Tool (in the app settings page on Twitter) is telling me it should be. I'm at a loss for what else to try. Here is what the header traces out:</p>
  
  <pre><code>Authorization: OAuth oauth_timestamp="1346276194",
  oauth_token="14815835-[REMOVED FOR STACK OVERFLOW]",
  oauth_signature="Vj%2FTjbV%2FumMKS66yK8VMXSv%2Fpl4%3D",
  oauth_consumer_key="bUka[REMOVED FOR STACK OVERFLOW]",
  oauth_signature_method="HMAC-SHA1",
  oauth_version="1.0",
  oauth_nonce="74C5E2D8-D805-9B04-6353-7450770E1056"
  </code></pre>
  
  <p>This is what the Twitter OAuth tool tells me it should look like:</p>
  
  <pre><code>Authorization: OAuth oauth_consumer_key="bUka[REMOVED FOR STACK OVERFLOW]",
  oauth_nonce="95a9ef376211a67f550e55a32ad307e4",
  oauth_signature="avFkHD4d9fPRv9iE4OuczEI2AOU%3D",
  oauth_signature_method="HMAC-SHA1",
  oauth_timestamp="1346268740",
  oauth_token="14815835-[REMOVED FOR STACK OVERFLOW]",
  oauth_version="1.0"
  </code></pre>
  
  <p>As you can see, everything seems to match up... Including the oauth_token.</p>