title: Parse JSON message to retrieve Twitter data on iOS 5
body: <p>I'm trying to display in my app some public tweets retrieved from <a href="http://twitter.com/obamabarak" rel="nofollow">Obama twitter profile</a>. To retrieve twitter data, I've implemented this <code>getTweets</code> method:</p>
  
  <pre><code>-(void)getTweets
  {
      NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
      [params setObject:@"Obamabarak" forKey:@"screen_name"];
      [params setObject:@"10" forKey:@"count"];
      [params setObject:@"1" forKey:@"include_entities"];
      [params setObject:@"1" forKey:@"include_rts"];
  
  
      NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/user_timeline.json"];
  
      TWRequest *request = [[TWRequest alloc] initWithURL:url parameters:params requestMethod:TWRequestMethodGET];
  
      [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
      {
          if (error != nil)
          {
              //  Inspect the contents of error 
              exit(-1);
          }
          else
          {
              [self fetchJSONData:responseData];
          }
      }
  }
  </code></pre>
  
  <p>At this point, I've tried to implement the <code>fetchJSONData</code> method as follows:</p>
  
  <pre><code>- (void)fetchJSONData:(NSData *)responseData
  {
  NSError* error;
  
  NSDictionary* jsonResults = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
  
  NSArray *myArrayOfDictionaries = [[jsonResults objectForKey:@"tweets"] objectForKey:@"results"];
  
  for (NSDictionary *myDictionary in myArrayOfDictionaries)
  {
      // Get title of the image
      NSString *title = [myDictionary objectForKey:@"title"];
      ...
  </code></pre>
  
  <p>But it doesn't work and no record is displayed. I'm not sure if this is the right way and I don't know how to proceed. Can you please help me to find a way to display Obama tweets?</p>
  
  <p>Thanks in advance</p>