code: public void add(String photoId) throws  FlickrException {
          Map<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("method", METHOD_ADD);
          parameters.put("photo_id", photoId);
  
          Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
          if (response.isError()) {
              throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
          }
      }
docs: Add a photo to the user's favorites.
  
  @param photoId
  The photo ID
  @throws FlickrException