title: Programmatically Facebook loging in on Android (Session.isOpened always returns false)
body: <p>I'm having a problem loging in programmatically, and after loging in, when I want the user to post something, when I check the acdtive session for isOpened() it returns false, so I cannot make any request...</p>
  
  <p>Here is the login Code:</p>
  
  <pre><code>public void login()
  {
      Session session = Session.getActiveSession();
  
      if (session == null) 
      {
          session = new Session.Builder(ResourceManager.getInstance().getMainActivity()).build();
          Session.setActiveSession(session);
      }
  
      if (!session.isOpened()) 
      {
          Session.OpenRequest openRequest = new Session.OpenRequest(ResourceManager.getInstance().getMainActivity());
          openRequest.setPermissions(PERMISSIONS);
          openRequest.setLoginBehavior(SessionLoginBehavior.SSO_WITH_FALLBACK);
          session.openForPublish(openRequest);
      }
  }
  </code></pre>
  
  <p>And here is the code where I check if I can use the session:</p>
  
  <pre><code>public void post()
  {
      Session session = Session.getActiveSession();
      if (session != null) 
      {
          // This returns always false, so it never goes in...
          if (session.isOpened())
          {
              postStatus(String pStatus);
          }
      }
  }
  </code></pre>