title: How do you get a Facebook photo's source URL using the facebook graph api?
body: <p>Could you tell me how to use graph api to get the source url for a photo? Because I have the photo id and it seems like I should be able to make a call to get the source url.</p>
  
  <p>As an example of what I'm trying to do, the following code works:</p>
  
  <pre><code>-(IBAction)showPicture:(UIButton *)sender;
  {
      //code to retrieve picture
  
      id path = @"http://photos-e.ak.fbcdn.net/photos-ak-snc1/v5041/89/51/40796308305/a40796308305_1960517_6704612.jpg";
      NSURL *url = [NSURL URLWithString:path];
      NSData  *data = [NSData dataWithContentsOfURL:url];
      UIImage *img = [[UIImage alloc] initWithData:data];
      [self.label setText: (NSString *)path];
      imageView.image = img;
      [img release];
  
  }
  </code></pre>
  
  <p>However that works when I have the source url. Is there a way to use graph api so that I can substitute <code>id path = @"http://..."</code> for something like <code>id path = [_facebook requestWithGraphPath:@"98423808305/source" andDelegate:self];</code> ???</p>
  
  <hr>
  
  <p>Updated to include request didLoad method</p>
  
  <pre><code>- (void)request:(FBRequest *)request didLoad:(id)result {
  
  
      if ([request.params objectForKey:@"picture"]) {
          // Get photo ID from result
          NSString *photoId = (NSString *)[result objectForKey:@"id"];
          shitStorm = photoId;
      }
  
  
    if ([result isKindOfClass:[NSArray class]]) {
      result = [result objectAtIndex:0];
    }
    if ([result objectForKey:@"owner"]) {
      [self.label setText:@"Photo upload Success"];
    } else {
      [self.label setText:[result objectForKey:@"name"]];
    }
  };
  </code></pre>