title: How to check if Facebook is installed Android
body: <p>I am modifying my app to be able to catch if a user tries to publish without having the facebook app installed (required for SSO).  Here is the code I am using:</p>
  
  <pre><code>try{
      ApplicationInfo info = getPackageManager().
              getApplicationInfo("com.facebook.android", 0 );
      return true;
  } catch( PackageManager.NameNotFoundException e ){
      return false;
  }
  </code></pre>
  
  <p>The problem is, it is always catching an error.  According to the question <a href="https://stackoverflow.com/questions/4323553/way-to-know-if-my-application-is-installed">here</a>, I need to request the appropriate permission but I don't know what permissions I need to request.</p>
  
  <p>Is my problem a permission one or something else?</p>