title: how to open Facebook app from url only if installed
body: <p>I would like to know how to open up a url link from my website in the facebook and twitter app only if it is installed on the device, if not I would like the page to be opened in the browser.</p>
  
  <p>Currently I am using the following links:</p>
  
  <pre><code>fb://profile/fbID
  twitter://user?screen_name=username
  </code></pre>
  
  <p>Currently it works fine if the app is installed but the link fails if the app isn't installed, further to this the twitter link fails completely if you try to open it in a desktop browser.</p>
  
  <p>Would anyone know how I go about this? </p>
  
  <p>Yes I know there are similar questions but none have been answered so I thought I'd try this, cheers.</p>