Class Photo

All Implemented Interfaces:
HasComments, HasCreatedTime, Serializable

public class Photo extends NamedFacebookType implements HasComments, HasCreatedTime
Represents the Photo Graph API type.
Since:
1.5
Author:
Mark Allen
See Also:
  • Constructor Details

  • Method Details

    • getTags

      public List<Photo.Tag> getTags()
      An array containing the users and their positions in this photo. The x and y coordinates are percentages from the left and top edges of the photo, respectively.
      Returns:
      An array containing the users and their positions in this photo. The x and y coordinates are percentages from the left and top edges of the photo, respectively.
    • addTag

      public boolean addTag(Photo.Tag tag)
    • removeTag

      public boolean removeTag(Photo.Tag tag)
    • getNameTags

    • addNameTag

      public boolean addNameTag(EntityAtTextRange nameTag)
    • removeNameTag

      public boolean removeNameTag(EntityAtTextRange nameTag)
    • getImages

      The 4 different stored representations of the photo.
      Returns:
      The 4 different stored representations of the photo.
      Since:
      1.6.5
    • addImage

      public boolean addImage(Photo.Image image)
    • removeImage

      public boolean removeImage(Photo.Image image)
    • jsonMappingCompleted

      protected void jsonMappingCompleted(JsonMapper jsonMapper)
      Post-JSON-mapping operation that populates the messageTags field "by hand".
      Parameters:
      jsonMapper - The JsonMapper that was used to map to this type.
    • getFrom

      public From getFrom()
      An object containing the name and ID of the user who posted the photo.
      Returns:
      An object containing the name and ID of the user who posted the photo.
    • setFrom

      public void setFrom(From from)
      An object containing the name and ID of the user who posted the photo.
    • getPicture

      public String getPicture()
      The album-sized view of the photo.
      Returns:
      The album-sized view of the photo.
    • setPicture

      public void setPicture(String picture)
      The album-sized view of the photo.
    • getPageStoryId

      ID of the page story this corresponds to. May not be on all photos. Applies only to published photos
      Returns:
      ID of the page story this corresponds to.
    • setPageStoryId

      public void setPageStoryId(String pageStoryId)
      ID of the page story this corresponds to. May not be on all photos. Applies only to published photos
    • getReactions

      The reactions for this photo.
      Returns:
      The reactions for this photo.
    • setReactions

      public void setReactions(Reactions reactions)
      The reactions for this photo.
    • getSource

      Deprecated.
      Use images field instead
      The full-sized source of the photo.
      Returns:
      The full-sized source of the photo.
    • setSource

      @Deprecated public void setSource(String source)
      Deprecated.
      Use images field instead
      The full-sized source of the photo.
    • getHeight

      public Integer getHeight()
      The height of the photo, in pixels.
      Returns:
      The height of the photo, in pixels.
    • setHeight

      public void setHeight(Integer height)
      The height of the photo, in pixels.
    • getWidth

      public Integer getWidth()
      The width of the photo, in pixels.
      Returns:
      The width of the photo, in pixels.
    • setWidth

      public void setWidth(Integer width)
      The width of the photo, in pixels.
    • getLink

      public String getLink()
      A link to the photo on Facebook.
      Returns:
      A link to the photo on Facebook.
    • setLink

      public void setLink(String link)
      A link to the photo on Facebook.
    • getIcon

      public String getIcon()
      The icon-sized source of the photo.
      Returns:
      The icon-sized source of the photo.
    • setIcon

      public void setIcon(String icon)
      The icon-sized source of the photo.
    • getAlbum

      public Album getAlbum()
      The album this photo is in
      Returns:
      The album this photo is in
    • setAlbum

      public void setAlbum(Album album)
      The album this photo is in
    • getCanDelete

      A boolean indicating if the viewer can delete the photo
      Returns:
      A boolean indicating if the viewer can delete the photo
    • setCanDelete

      public void setCanDelete(Boolean canDelete)
      A boolean indicating if the viewer can delete the photo
    • getCanTag

      public Boolean getCanTag()
      A boolean indicating if the viewer can tag the photo
      Returns:
      A boolean indicating if the viewer can tag the photo
    • setCanTag

      public void setCanTag(Boolean canTag)
      A boolean indicating if the viewer can tag the photo
    • getPosition

      Deprecated.
      Facebook will start returning 0 for this field starting on October 3, 2012.
      The position of this photo in the album.
      Returns:
      The position of this photo in the album.
      Since:
      1.6.5
    • setPosition

      @Deprecated public void setPosition(Integer position)
      Deprecated.
      Facebook will start returning 0 for this field starting on October 3, 2012.
      The position of this photo in the album.
      Since:
      1.6.5
    • getEvent

      @GraphAPI(since="2.3") public Event getEvent()
      If this object has a place, the event associated with the place
      Returns:
      If this object has a place, the event associated with the place
    • setEvent

      public void setEvent(Event event)
      If this object has a place, the event associated with the place
    • getUpdatedTime

      public Date getUpdatedTime()
      The last time the photo or its caption was updated.
      Returns:
      The last time the photo or its caption was updated.
    • setUpdatedTime

      public void setUpdatedTime(Date updatedTime)
      The last time the photo or its caption was updated.
    • getCreatedTime

      public Date getCreatedTime()
      The time the photo was initially published.
      Specified by:
      getCreatedTime in interface HasCreatedTime
      Returns:
      The time the photo was initially published.
    • setCreatedTime

      public void setCreatedTime(Date createdTime)
      The time the photo was initially published.
    • getComments

      All of the comments on this photo.
      Specified by:
      getComments in interface HasComments
      Returns:
      All of the comments on this photo.
      Since:
      1.6.5
    • setComments

      public void setComments(Comments comments)
      All of the comments on this photo.
      Since:
      1.6.5
    • getLikes

      public Likes getLikes()
    • setLikes

      public void setLikes(Likes likes)
    • getPlace

      public Place getPlace()
      The location associated with this photo, if any.
      Returns:
      The place this photo was taken.
      Since:
      1.6.10
    • setPlace

      public void setPlace(Place place)
      The location associated with this photo, if any.
      Since:
      1.6.10
    • getBackdatedTime

      Back dated time
      Returns:
      the back dated time
      Since:
      1.6.15
    • setBackdatedTime

      public void setBackdatedTime(Date backdatedTime)
      Back dated time
      Since:
      1.6.15
    • getBackdatedTimeGranularity

      String that represents the back dated time granularity
      Returns:
      the back dated time granularity
      Since:
      1.6.15
    • setBackdatedTimeGranularity

      public void setBackdatedTimeGranularity(String backdatedTimeGranularity)
      String that represents the back dated time granularity
      Since:
      1.6.15
    • getInsights

    • setInsights

      public void setInsights(Connection<Insight> insights)