docs: private void authorize(Activity activity, String[] permissions, int activityCode,
                            SessionLoginBehavior behavior, final DialogListener listener) {
          checkUserSession("authorize");
          pendingOpeningSession = new Session.Builder(activity).
                  setApplicationId(mAppId).
                  setTokenCachingStrategy(getTokenCache()).
                  build();
          pendingAuthorizationActivity = activity;
          pendingAuthorizationPermissions = (permissions != null) ? permissions : new String[0];
  
          StatusCallback callback = new StatusCallback() {
              @Override
              public void call(Session callbackSession, SessionState state, Exception exception) {
                  // Invoke user-callback.
                  onSessionCallback(callbackSession, state, exception, listener);
              }
          };
  
          Session.OpenRequest openRequest = new Session.OpenRequest(activity).
                  setCallback(callback).
                  setLoginBehavior(behavior).
                  setRequestCode(activityCode).
                  setPermissions(Arrays.asList(pendingAuthorizationPermissions));
          openSession(pendingOpeningSession, openRequest, pendingAuthorizationPermissions.length > 0);
      }