title: Facebook and Twitter pages integration on libgdx android
body: <p>I'm trying to set two simple buttons on the inicial screen of my app that open the facebook and twitter official sites of the app. Note I'm using libgdx. I created two siumple buttons, fb and tw.</p>
  
  <p>I'm using this code in my Input Handler:</p>
  
  <pre><code>if (fb.isTouchUp(screenX, screenY)) {
      try {
          Gdx.net.openURI("fb://page/&lt;page_id&gt;");
      } catch(Exception e) {
          Gdx.net.openURI("https://facebook.com/&lt;page_name&gt;");
      }
      return true;
  
  }
  
  if (tw.isTouchUp(screenX, screenY)) {
      try {
          Gdx.net.openURI("twitter://user?user_id=&lt;user_id&gt;");
      } catch(Exception e) {
          Gdx.net.openURI("https://twitter.com/&lt;user_name&gt;");
      }
      return true;
  }
  </code></pre>
  
  <p>If the android device has installed the official facebook and twitter apps, there is no problem, it opens well the correct pages on their respective apps, but if facebook and twitter apps are not installed, insted of opening the url with the default browser, the app crashes.</p>
  
  <p>I don't know why is this happening, do you have some idea?</p>