title: twitter update using TWRequest gives 403 error
body: <p>i'm using the following code to tweet in user's timeline using the iOS 5 twitter API</p>
  
  <p>// Create an account store object.
      ACAccountStore *accountStore = [[ACAccountStore alloc] init];</p>
  
  <pre><code>// Create an account type that ensures Twitter accounts are retrieved.
  ACAccountType *accountType =  [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
  
  // Request access from the user to use their Twitter accounts.
  [accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) 
   {
       if(granted) 
       {
           // Get the list of Twitter accounts.
           NSArray *accountsArray = [accountStore accountsWithAccountType:accountType];
  
           // For the sake of brevity, we'll assume there is only one Twitter account present.
           // You would ideally ask the user which account they want to tweet from, if there is more than one Twitter account present.
           // Grab the initial Twitter account to tweet from.
           ACAccount *twitterAccount = [accountsArray objectAtIndex:buttonIndex];
           // Create a request, which in this example, posts a tweet to the user's timeline.
           // This example uses version 1 of the Twitter API.
           // This may need to be changed to whichever version is currently appropriate.
  
  
           TWRequest *postRequest = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/statuses/update.json"] parameters:[NSDictionary dictionaryWithObject:@"hello this is a tweet" forKey:@"status"] requestMethod:TWRequestMethodPOST];
  
           // Set the account used to post the tweet.
           [postRequest setAccount:twitterAccount];
  
           // Perform the request created above and create a handler block to handle the response.
           [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) 
            {
  
                NSString *output = [NSString stringWithFormat:@"%i", [urlResponse statusCode]];
                [self performSelectorOnMainThread:@selector(TweetStatus:) withObject:output waitUntilDone:NO];
            }];
       }
   }];
  </code></pre>
  
  <p>i've been using this method for more than a month now for testing the application and it used to work fine with no problems.</p>
  
  <p><strong>few weeks a goo it started to return a 403 error in the following method.</strong></p>
  
  <pre><code>[postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) 
            {
  
                NSString *output = [NSString stringWithFormat:@"%i", [urlResponse statusCode]];
                [self performSelectorOnMainThread:@selector(TweetStatus:) withObject:output waitUntilDone:NO];
            }];
  </code></pre>
  
  <p>it gives the following error:</p>
  
  <pre><code>Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x1f8b3250 {NSErrorFailingURLKey=http://api.twitter.com/1/statuses/update.json, NSErrorFailingURLStringKey=http://api.twitter.com/1/statuses/update.json, NSUnderlyingError=0x1ed19f90 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012
  </code></pre>
  
  <p>i've searched a lot and could not find any solution or real cause to this problem.</p>
  
  <p>a few notes to keep in mind that might help understanding the problem:</p>
  
  <ul>
  <li>the application is used for testing which means that we used the twitter sharing and mentions a lot with other users.</li>
  <li>the sharing content is not always the same so no duplication issue should occur as we were clearing the timeline frequently.</li>
  </ul>
  
  <p>thanks</p>