Package com.restfb.types
Class Photo
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.FacebookType
com.restfb.types.NamedFacebookType
com.restfb.types.Photo
- All Implemented Interfaces:
HasComments
,HasCreatedTime
,Serializable
Represents the Photo Graph API type.
- Since:
- 1.5
- Author:
- Mark Allen
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the Image Graph API type.static class
Represents the Tag Graph API type.Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addImage
(Photo.Image image) boolean
addNameTag
(EntityAtTextRange nameTag) boolean
getAlbum()
The album this photo is inBack dated timeString that represents the back dated time granularityA boolean indicating if the viewer can delete the photoA boolean indicating if the viewer can tag the photoAll of the comments on this photo.The time the photo was initially published.getEvent()
If this object has a place, the event associated with the placegetFrom()
An object containing the name and ID of the user who posted the photo.The height of the photo, in pixels.getIcon()
The icon-sized source of the photo.The 4 different stored representations of the photo.getLikes()
getLink()
A link to the photo on Facebook.ID of the page story this corresponds to.The album-sized view of the photo.getPlace()
The location associated with this photo, if any.Deprecated.Facebook will start returning 0 for this field starting on October 3, 2012.The reactions for this photo.Deprecated.Useimages
field insteadgetTags()
An array containing the users and their positions in this photo.The last time the photo or its caption was updated.getWidth()
The width of the photo, in pixels.protected void
jsonMappingCompleted
(JsonMapper jsonMapper) Post-JSON-mapping operation that populates themessageTags
field "by hand".boolean
removeImage
(Photo.Image image) boolean
removeNameTag
(EntityAtTextRange nameTag) boolean
void
The album this photo is invoid
setBackdatedTime
(Date backdatedTime) Back dated timevoid
setBackdatedTimeGranularity
(String backdatedTimeGranularity) String that represents the back dated time granularityvoid
setCanDelete
(Boolean canDelete) A boolean indicating if the viewer can delete the photovoid
A boolean indicating if the viewer can tag the photovoid
setComments
(Comments comments) All of the comments on this photo.void
setCreatedTime
(Date createdTime) The time the photo was initially published.void
If this object has a place, the event associated with the placevoid
An object containing the name and ID of the user who posted the photo.void
The height of the photo, in pixels.void
The icon-sized source of the photo.void
setInsights
(Connection<Insight> insights) void
void
A link to the photo on Facebook.void
setPageStoryId
(String pageStoryId) ID of the page story this corresponds to.void
setPicture
(String picture) The album-sized view of the photo.void
The location associated with this photo, if any.void
setPosition
(Integer position) Deprecated.Facebook will start returning 0 for this field starting on October 3, 2012.void
setReactions
(Reactions reactions) The reactions for this photo.void
Deprecated.Useimages
field insteadvoid
setUpdatedTime
(Date updatedTime) The last time the photo or its caption was updated.void
The width of the photo, in pixels.Methods inherited from class com.restfb.types.NamedFacebookType
getName, setName
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
Constructor Details
-
Photo
public Photo()
-
-
Method Details
-
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
-
removeTag
-
getNameTags
-
addNameTag
-
removeNameTag
-
getImages
The 4 different stored representations of the photo.- Returns:
- The 4 different stored representations of the photo.
- Since:
- 1.6.5
-
addImage
-
removeImage
-
jsonMappingCompleted
Post-JSON-mapping operation that populates themessageTags
field "by hand".- Parameters:
jsonMapper
- TheJsonMapper
that was used to map to this type.
-
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
An object containing the name and ID of the user who posted the photo. -
getPicture
The album-sized view of the photo.- Returns:
- The album-sized view of the photo.
-
setPicture
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
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
The reactions for this photo. -
getSource
Deprecated.Useimages
field insteadThe full-sized source of the photo.- Returns:
- The full-sized source of the photo.
-
setSource
Deprecated.Useimages
field insteadThe full-sized source of the photo. -
getHeight
The height of the photo, in pixels.- Returns:
- The height of the photo, in pixels.
-
setHeight
The height of the photo, in pixels. -
getWidth
The width of the photo, in pixels.- Returns:
- The width of the photo, in pixels.
-
setWidth
The width of the photo, in pixels. -
getLink
A link to the photo on Facebook.- Returns:
- A link to the photo on Facebook.
-
setLink
A link to the photo on Facebook. -
getIcon
The icon-sized source of the photo.- Returns:
- The icon-sized source of the photo.
-
setIcon
The icon-sized source of the photo. -
getAlbum
The album this photo is in- Returns:
- The album this photo is in
-
setAlbum
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
A boolean indicating if the viewer can delete the photo -
getCanTag
A boolean indicating if the viewer can tag the photo- Returns:
- A boolean indicating if the viewer can tag the photo
-
setCanTag
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.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
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
If this object has a place, the event associated with the place -
getUpdatedTime
The last time the photo or its caption was updated.- Returns:
- The last time the photo or its caption was updated.
-
setUpdatedTime
The last time the photo or its caption was updated. -
getCreatedTime
The time the photo was initially published.- Specified by:
getCreatedTime
in interfaceHasCreatedTime
- Returns:
- The time the photo was initially published.
-
setCreatedTime
The time the photo was initially published. -
getComments
All of the comments on this photo.- Specified by:
getComments
in interfaceHasComments
- Returns:
- All of the comments on this photo.
- Since:
- 1.6.5
-
setComments
All of the comments on this photo.- Since:
- 1.6.5
-
getLikes
-
setLikes
-
getPlace
The location associated with this photo, if any.- Returns:
- The place this photo was taken.
- Since:
- 1.6.10
-
setPlace
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
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
String that represents the back dated time granularity- Since:
- 1.6.15
-
getInsights
-
setInsights
-