title: Making a GET rest call for flickr api from xcode
body: <p>I'm trying to make a GET call using flickr.photos.getInfo method from an app. Goal is to get info about a photo using it's id.</p>
  
  <p>my method:</p>
  
  <pre><code>+(NSDictionary*)photoForId:(NSString *)photoID
  {
      NSLog(@"photo id = %@", photoID);
      NSString *request=[NSString stringWithFormat:@"http://api.flickr.com/services/rest/flickr.photos.getInfo&amp;photo_id=%@&amp;format=json&amp;nojsoncallback=1&amp;extras=original_format,tags,description,geo,date_upload,owner_name&amp;page=1&amp;method=flickr.photos.search", photoID];
  
          NSLog(@"output=%@",[self executeFlickrFetch:request]);
      return [[[self executeFlickrFetch:request]valueForKey:@"photos.photo"]lastObject];
  
  }
  </code></pre>
  
  <p>executeFlickrFetch method:</p>
  
  <pre><code>+ (NSDictionary *)executeFlickrFetch:(NSString *)query
  {
      query = [NSString stringWithFormat:@"%@&amp;format=json&amp;nojsoncallback=1&amp;api_key=%@", query, FlickrAPIKey];
      query = [query stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    NSStringFromSelector(_cmd), query);
      NSData *jsonData = [[NSString stringWithContentsOfURL:[NSURL URLWithString:query] encoding:NSUTF8StringEncoding error:nil] dataUsingEncoding:NSUTF8StringEncoding];
      NSError *error = nil;
      NSDictionary *results = jsonData ? [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers|NSJSONReadingMutableLeaves error:&amp;error] : nil;
      return results;
  }
  </code></pre>
  
  <p>Right now this call is returning null. I know execute fetch works because it is fetching photos by photographer, or place. Just need to figure out the photo id.</p>