code: static FacebookSettings newInstance(Bundle bundle) {
          FacebookSettings settings = null;
  
          int destinationId = bundle.getInt(BUNDLE_KEY_DESTINATION_ID);
          String accountName = bundle.getString(BUNDLE_KEY_ACCOUNT_NAME);
          String albumName = bundle.getString(BUNDLE_KEY_ALBUM_NAME);
          String albumGraphPath = bundle.getString(BUNDLE_KEY_ALBUM_GRAPH_PATH);
          String pageAccessToken = bundle.getString(BUNDLE_KEY_PAGE_ACCESS_TOKEN);
          String photoPrivacy = bundle.getString(BUNDLE_KEY_PHOTO_PRIVACY);
  
          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 from a {@link Bundle} created by the {@link #toBundle()} method.
  
  @param bundle the {@link Bundle}.
  @return a new {@link FacebookSettings} instance; or null if the {@link Bundle} is invalid.