title: Posting text on wall: the user hasn't authorized the application to perform this action facebook in android
body: <p>I know this question has been asked many times before. But none of those answers are working for me.When iam logging in with different user,error is shown.If  login with credentials admin of this app,posting on wall is working fine.Please try solve this issue.</p>
  
  <p>Here is my code:</p>
  
  <p>if (isFB) { // calling FB login</p>
  
  <pre><code>        Session session = new Session(this);
          Session.setActiveSession(session);
  
          Settings.addLoggingBehavior(LoggingBehavior.INCLUDE_ACCESS_TOKENS);
  
          Session.StatusCallback statusCallback = new Session.StatusCallback() {
              @Override
              public void call(Session session, SessionState state,
                      Exception exception) {
                  String message = "Facebook session status changed - "
                          + session.getState() + " - Exception: " + exception;
                  // Toast.makeText(FacebookShareActivity.this, message,
                  // Toast.LENGTH_SHORT).show();
                  Log.w("Facebook test", message);
  
                  if (session.isOpened()
                          || session.getPermissions().contains(
                                  "publish_actions")) {
                      publishToWall();
                  } else if (session.isOpened()) {
                      OpenRequest open = new OpenRequest(
                      RegisterActivity.this).setCallback(this);
                      List&lt;String&gt; permission = new ArrayList&lt;String&gt;();
                      permission.add("publish_actions");
                      open.setPermissions(permission);
                      Log.w("Facebook test", "Open for publish");
                      session.openForPublish(open);
                  }
              }
          };
  
          if (!session.isOpened() &amp;&amp; !session.isClosed()
                  &amp;&amp; session.getState() != SessionState.OPENING) {
              session.openForRead(new Session.OpenRequest(this)
                      .setCallback(statusCallback));
          } else {
              Log.w("Facebook test", "Open active session");
              Session.openActiveSession(this, true, statusCallback);
          }
      }
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      Session.getActiveSession().onActivityResult(this, requestCode,
              resultCode, data);
  }
  void publishToWall() {
      Session session = Session.getActiveSession();
  
      Bundle postParams = new Bundle();
      postParams.putString("message", "hi");
  
      Request request = new Request(Session.getActiveSession(), "me/feed",
              postParams, HttpMethod.POST, callback);
  
      RequestAsyncTask task = new RequestAsyncTask(request);
      task.execute();
  }
  </code></pre>