API Methods: photos.editPhoto



Description

Edits or creates a new photo


Authentication

This method requires authentication with 'write' permission.

Required parameters

  • None

Optional parameters

  • photos_id :
    the id number of the photo. If this is included, the photo's details are edited rather than uploading a new photo. The list of photo ids is available from the photos.getList call.
  • photo :
    this is the photo itself which should be encapsulated as part of a multipart/form-data submission via an HTTP POST action. This parameter is required to upload a new photo to the site in which case the photo_id parameter is not passed in.
  • group_id :
    the id number of the group to which the photo belongs. If this is included, the photo is added to that group's gallery instead of the site gallery. The list of group ids is available from the groups.getList call.
  • caption :
    the caption for the photo
  • default :
    this is a boolean value (0=false, 1=true) which determines if the photo is to be the default photo for the user or group to which it belongs.
  • shared :
    this is a boolean value which determines if the photo is shared in the site gallery

Example response

<?xml version="1.0"?>
<response status="ok" time="Tue, 22 Apr 2008 15:46:04 -0500">
    <photos count="1">
        <photo>
            <photos_id>39</photos_id>
        </photo>
    </photos>
</response>