title: How to make Twitter XAuth post request data for access token?
body: <p>When I had used following code, I got the message "Failed to validate oauth signature and token" </p>
  
  <pre><code>     NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"]];
    [request setHTTPMethod:@"POST"];
  
    NSString *postString = @"oauth_consumer_key=My Consumer key&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_signature=My Consumer secret&amp;oauth_timestamp=?????&amp;oauth_nonce=?????oauth_version=1.0&amp;x_auth_username=My Twitter ID&amp;x_auth_password=My Twitter password&amp;x_auth_mode=client_auth";
    [request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]]; 
  
    NSHTTPURLResponse *response = NULL;
    NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:nil];
    NSString *responseDataString = [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding];
  
    NSLog(@"Response from Twitter: %@", responseDataString);
  </code></pre>
  
  <p>So, I want to know exact configuration of request contents
  The used post data as following. and My application had the ability to use xAuth</p>
  
  <blockquote>
    <p>oauth_consumer_key=My Consumer key</p>
    
    <p>oauth_signature_method=HMAC-SHA1</p>
    
    <p>oauth_signature=My Consumer secret</p>
    
    <p>oauth_timestamp=?????</p>
    
    <p>oauth_nonce=?????</p>
    
    <p>oauth_version=1.0</p>
    
    <p>x_auth_username=My Twitter ID</p>
    
    <p>x_auth_password=My Twitter password</p>
    
    <p>x_auth_mode=client_auth</p>
  </blockquote>