title: iOS iPhone SDK integrating app with instagram
body: <p>Integrating app with instagram.. How it can be done please help thanks in advance
  this is the code I have tried</p>
  
  <pre><code> NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"];
      if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
          NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
          NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"Image.ig"];
  
      UIImage *image = [UIImage imageNamed:@"instagram.jpeg"];
  
      NSData *imageData = UIImagePNGRepresentation(image);
      [imageData writeToFile:savedImagePath atomically:YES];
      NSURL *imageUrl = [NSURL fileURLWithPath:savedImagePath];
      NSLog(@"%@",imageUrl);
      UIDocumentInteractionController *docController = [[UIDocumentInteractionController alloc] init];
      docController.delegate = self;
      docController.UTI = @"com.instagram.photo";
      docController.URL = imageUrl;
      [docController setURL:imageUrl];
      [docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
  }
  </code></pre>