title: Twitter OAuth and accessToken to GET statuses/user_timeline in Objective-C
body: <p>I'm trying to acquire the accessToken value from Twitter for using it in my app (I need to use API v1.1's Authentication Model for <strong>GET statuses/user_timeline</strong>); I have registered my app on api.twitter.com, imported the <a href="https://github.com/AFNetworking/AFOAuth1Client" rel="nofollow">AFOAuth1Client</a> classes in the project, and this is the simple code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      self.twitterClient = [[AFOAuth1Client alloc] initWithBaseURL:
                                       [NSURL URLWithString:@"https://api.twitter.com/"] key:@"MYKEY" secret:@"MYSECRETKEY"];
      AFOAuth1Token *accessToken;
  
      [self.twitterClient acquireOAuthAccessTokenWithPath:@"oauth/request_token" requestToken:accessToken accessMethod:@"GET" success:^(AFOAuth1Token *accessToken) { // I have tried also accessMethod: @"POST"
          NSLog(@"Success: %@", accessToken);
      } failure:^(NSError *error) {
          NSLog(@"Error: %@", error);
      }];
  }
  </code></pre>
  
  <p>Unluckly XCode give me this error:</p>
  
  <pre><code>Error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 401" UserInfo=0x79a14f0 {NSLocalizedRecoverySuggestion=Failed to validate oauth signature and token, AFNetworkingOperationFailingURLResponseErrorKey=&lt;NSHTTPURLResponse: 0x7956390&gt;
  </code></pre>
  
  <p>What is wrong here? DO i need to REGISTER app on api.twitter.com? Is it the right way, or, what is the simpler way to <strong>Get statuses/user_timeline</strong> using API v1.1's Twitter Authentication Model in iOS? Thank you!</p>
  
  <p><strong>EDIT: possible waypoint?</strong></p>
  
  <p>1) register a new app on dev.twitter.com</p>
  
  <p>2) in OAuth settings, read Consumer key and Consumer secret</p>
  
  <p>3) set default app access type to read? or read/write? ask for access tokens? use this values in.... ?</p>