title: Open Facebook Messenger from iOS app
body: <p>Does anyone know how can I open the Facebook messenger application with a pre-filled text?</p>
  
  <p>For example, to open the messenger app at a specified user, you can write the following:</p>
  
  <pre><code> NSURL *fbURL = [NSURL URLWithString:@"fb-messenger://user-thread/USER_ID"]; 
  if ([[UIApplication sharedApplication] canOpenURL: fbURL]) {
      [[UIApplication sharedApplication] openURL: fbURL];
  }
  </code></pre>
  
  <p>For Whats app is very easy:</p>
  
  <pre><code>NSURL *whatsappURL = [NSURL URLWithString:[NSString stringWithFormat:@"whatsapp://send?text=%@", @"String to post here"]];
  if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
      [[UIApplication sharedApplication] openURL: whatsappURL];
  }
  </code></pre>