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
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the Image Graph API type.static classRepresents the Tag Graph API type.Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddImage(Photo.Image image) booleanaddNameTag(EntityAtTextRange nameTag) booleangetAlbum()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.Useimagesfield 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 voidjsonMappingCompleted(JsonMapper jsonMapper) Post-JSON-mapping operation that populates themessageTagsfield "by hand".booleanremoveImage(Photo.Image image) booleanremoveNameTag(EntityAtTextRange nameTag) booleanvoidThe album this photo is invoidsetBackdatedTime(Date backdatedTime) Back dated timevoidsetBackdatedTimeGranularity(String backdatedTimeGranularity) String that represents the back dated time granularityvoidsetCanDelete(Boolean canDelete) A boolean indicating if the viewer can delete the photovoidA boolean indicating if the viewer can tag the photovoidsetComments(Comments comments) All of the comments on this photo.voidsetCreatedTime(Date createdTime) The time the photo was initially published.voidIf this object has a place, the event associated with the placevoidAn object containing the name and ID of the user who posted the photo.voidThe height of the photo, in pixels.voidThe icon-sized source of the photo.voidsetInsights(Connection<Insight> insights) voidvoidA link to the photo on Facebook.voidsetPageStoryId(String pageStoryId) ID of the page story this corresponds to.voidsetPicture(String picture) The album-sized view of the photo.voidThe location associated with this photo, if any.voidsetPosition(Integer position) Deprecated.Facebook will start returning 0 for this field starting on October 3, 2012.voidvoidsetReactions(Reactions reactions) The reactions for this photo.voidDeprecated.Useimagesfield insteadvoidsetUpdatedTime(Date updatedTime) The last time the photo or its caption was updated.voidThe width of the photo, in pixels.Methods inherited from class com.restfb.types.NamedFacebookType
getName, setNameMethods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setTypeMethods 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 themessageTagsfield "by hand".- Parameters:
jsonMapper- TheJsonMapperthat 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.Useimagesfield insteadThe full-sized source of the photo.- Returns:
- The full-sized source of the photo.
-
setSource
Deprecated.Useimagesfield 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:
getCreatedTimein 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:
getCommentsin 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
-
getPostId
-
setPostId
-
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
-