title: Error migrating existing OAuth credentials to ACAccountStore
body: <p>I'm having problems migrating existing OAuth credentials to ACAccountStore in iOS 5.</p>
  
  <pre><code>ACAccountStore *accountStore = [[ACAccountStore alloc] init];
  ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
  ACAccount *account = [[ACAccount alloc] initWithAccountType:accountType];
  ACAccountCredential *credential = [[ACAccountCredential alloc] initWithOAuthToken:savedToken tokenSecret:savedSecret];
  [account setCredential:credential];
  [accountStore saveAccount:account withCompletionHandler:^(BOOL success, NSError *error) {
      if (error) {
          NSLog(@"error saving account: %@", error.description);
      }
  
      NSLog(@"saved account? %d", success);
  }];
  </code></pre>
  
  <p>The end result being:</p>
  
  <pre><code>2011-10-17 19:09:32.927 League[13731:1b803] error saving account: Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)"
  2011-10-17 19:09:32.927 League[13731:1b803] saved account? 0
  </code></pre>