code: static FacebookSettings newInstance(int destinationId, String accountName, String albumName, String albumGraphPath, String pageAccessToken, String photoPrivacy) {
          FacebookSettings settings = null;
  
          if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(albumName) && !TextUtils.isEmpty(albumGraphPath)) {
              if (destinationId == FacebookEndpoint.DestinationId.PROFILE) {
                  settings = new FacebookSettings(destinationId, accountName, albumName, albumGraphPath, pageAccessToken, photoPrivacy);
              } else if ((destinationId == FacebookEndpoint.DestinationId.PAGE || destinationId == FacebookEndpoint.DestinationId.PAGE_ALBUM)
                      && !TextUtils.isEmpty(pageAccessToken)) {
                  settings = new FacebookSettings(destinationId, accountName, albumName, albumGraphPath, pageAccessToken, photoPrivacy);
              }
          }
  
          return settings;
      }
docs: Creates a new {@link FacebookSettings} instance.
  
  @param destinationId   the destination id.
  @param accountName     the user name associated with the account.
  @param albumName       the name of the album to share to.
  @param albumGraphPath  the graph path of the album to share to.
  @param pageAccessToken the Page access token. Only used for sharing to Pages. May be null.
  @param photoPrivacy    the privacy level of shared photos. Only used for albums with 'custom' privacy level. May be null.
  @return a new {@link FacebookSettings} instance; or null if any of the params are invalid.