title: how to open instagram app on button click
body: <ol>
  <li><p>Hi all am trying to open instagram app on a button click but am not
  able to  i set Url scheme as instagram in plist also </p>
  
  <pre><code>NSString *instagramURL = @"instagram://app"; 
  NSURL *ourURL = [NSURLURLWithString:instagramURL]; 
  if ([[UIApplication sharedApplication]canOpenURL:ourURL]) {
      [[UIApplication sharedApplication]openURL:ourURL];
  
  } else {
      //The App is not installed. It must be installed from iTunes code.
      NSString *iTunesLink = @"//Some other Url goes here";
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
  
      UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"URL error"
            message:[NSString stringWithFormat: @"No custom URL defined for %@", ourURL]
            delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
      [alert show];
  </code></pre>
  
  <p>i did like this but app not opening  am new to iOS  any help can be
  appreciated</p></li>
  </ol>