title: Session state CLOSED_LOGIN_FAILED
body: <p>I'm working on facebook android sdk. I'm getting the hash key using following code .Now I'm getting error <strong>Session state CLOSED_LOGIN_FAILED</strong> after login to Facebook. </p>
  
  <p>Ref : <a href="https://stackoverflow.com/questions/16176832/ifsession-isopen-facebook-login-on-android-always-returning-false">if(session.isOpen()), facebook login on android always returning false</a></p>
  
  <pre><code>try {
          PackageInfo info = getPackageManager().getPackageInfo(
                  "your.root.package", 
                  PackageManager.GET_SIGNATURES);
          for (Signature signature : info.signatures) {
              MessageDigest md = MessageDigest.getInstance("SHA");
              md.update(signature.toByteArray());
              Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
              }
      } catch (NameNotFoundException e) {
  
      } catch (NoSuchAlgorithmException e) {
  
      }
  </code></pre>