code: private boolean finishPublishPermissionsRequest(Activity activity, int requestCode, int resultCode, Intent data) {
          boolean isSuccessful = false;
  
          Session session = Session.getActiveSession();
  
          // isOpened() must be called after onActivityResult().
          if (session != null && session.onActivityResult(activity, requestCode, resultCode, data) && session.isOpened()
                  && session.getPermissions().contains(PERMISSION_PUBLISH_ACTIONS)) {
              isSuccessful = true;
          }
  
          return isSuccessful;
      }
docs: Finishes a {@link com.groundupworks.wings.facebook.FacebookEndpoint#startPublishPermissionsRequest(android.app.Activity, android.support.v4.app.Fragment)}.
  
  @param activity    the {@link Activity}.
  @param requestCode the integer request code originally supplied to startActivityForResult(), allowing you to identify who
  this result came from.
  @param resultCode  the integer result code returned by the child activity through its setResult().
  @param data        an Intent, which can return result data to the caller (various data can be attached to Intent
  "extras").
  @return true if publish permissions request is successful; false otherwise.