Class Video

All Implemented Interfaces:
HasComments, HasCreatedTime, HasMessage, Serializable

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

  • Method Details

    • getCaptions

    • addCaption

      public boolean addCaption​(VideoCaption caption)
    • removeCaption

      public boolean removeCaption​(VideoCaption caption)
    • getFormat

      The different formats of the video.
      Returns:
      The different formats of the video.
    • addFormat

      public boolean addFormat​(Video.VideoFormat videoFormat)
    • removeFormat

      public boolean removeFormat​(Video.VideoFormat videoFormat)
    • getTags

      Tags for the video.
      Returns:
      Tags for the video.
      Since:
      1.6.5
    • addTag

      public boolean addTag​(NamedFacebookType tag)
    • removeTag

      public boolean removeTag​(NamedFacebookType tag)
    • getContentTags

      Tags that describe the contents of the video.
      Returns:
      Tags that describe the contents of the video.
    • addContentTag

      public boolean addContentTag​(String contentTag)
    • removeContentTag

      public boolean removeContentTag​(String contentTag)
    • getAdBreaks

      Time offsets of ad breaks in milliseconds. Ad breaks are short ads that play within a video.
      Returns:
      Time offsets of ad breaks in milliseconds. Ad breaks are short ads that play within a video.
    • addAdBreak

      public boolean addAdBreak​(Integer adBreak)
    • removeAdBreak

      public boolean removeAdBreak​(Integer adBreak)
    • getCustomLabels

      Labels used to describe the video. Unlike content tags, custom labels are not published and only appear in insights data.
      Returns:
      Labels used to describe the video.
    • addCustomLabel

      public boolean addCustomLabel​(String customLabel)
    • removeCustomLabel

      public boolean removeCustomLabel​(String customLabel)
    • addComment

      @Deprecated public boolean addComment​(Comment comment)
      Deprecated.
      work on the Comments object directly instead of using this method
      Adds a comment
      Parameters:
      comment - the comment that should be added
      Returns:
      true if the comment was added, false otherwise
    • removeComment

      @Deprecated public boolean removeComment​(Comment comment)
      Deprecated.
      work on the Comments object directly instead of using this method
      Adds a comment
      Parameters:
      comment - the comment that should be added
      Returns:
      true if the comment was added, false otherwise
    • getLikesCount

      public Long getLikesCount()
      The number of likes on this video. you have to fetch the video id with ?fields=likes.summary(true) in order to speed up the likes count generation, you may use ?fields=likes.limit(1).summary(true), so only 1 like is fetched, but the complete summary
      Returns:
      The number of likes on this video.
    • getCommentsCount

      The number of comments of this video. you have to fetch the video id with ?fields=comments.summary(true) in order to speed up the comments count generation, you may use ?fields=comments.limit(1).summary(true), so only 1 comment is fetched, but the complete summary
      Returns:
      The number of comments of this video.
    • getFrom

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

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

      Deprecated.
      FB seems to have removed this field.
      The video title / caption.
      Specified by:
      getMessage in interface HasMessage
      Returns:
      The video title / caption.
    • setMessage

      @Deprecated public void setMessage​(String message)
      Deprecated.
      FB seems to have removed this field.
      The video title / caption.
    • getComments

      The comments for this video.
      Specified by:
      getComments in interface HasComments
      Returns:
      The comments for this video.
    • setComments

      public void setComments​(Comments comments)
      The comments for this video.
    • getDescription

      The long-form HTML description of the video.
      Returns:
      The long-form HTML description of the video.
    • setDescription

      public void setDescription​(String description)
      The long-form HTML description of the video.
    • getPermalinkUrl

      URL to the permalink page of the video
      Returns:
      URL to the permalink page of the video
    • setPermalinkUrl

      public void setPermalinkUrl​(String permalinkUrl)
      URL to the permalink page of the video
    • getTitle

      @GraphAPI(since="2.5") public String getTitle()
      The video title or caption
      Returns:
      the video title or caption
    • setTitle

      public void setTitle​(String title)
      The video title or caption
    • getIsCrosspostVideo

    • setIsCrosspostVideo

      public void setIsCrosspostVideo​(Boolean isCrosspostVideo)
    • getIsCrosspostingEligible

      Specifies if the video is eligible for crossposting.
      Returns:
      Specifies if the video is eligible for crossposting
    • setIsCrosspostingEligible

      public void setIsCrosspostingEligible​(Boolean isCrosspostingEligible)
      Specifies if the video is eligible for crossposting.
    • getIsEpisode

      Whether this video is episode or not.
      Returns:
      Whether this video is episode or not.
    • setIsEpisode

      public void setIsEpisode​(Boolean isEpisode)
      Whether this video is episode or not.
    • getIsInstagramEligible

      Whether the video is eligible to be promoted on Instagram
      Returns:
      Whether the video is eligible to be promoted on Instagram
    • setIsInstagramEligible

      public void setIsInstagramEligible​(Boolean isInstagramEligible)
      Whether the video is eligible to be promoted on Instagram
    • getIsReferenceOnly

      Whether the video is exclusively used for copyright monitoring.
      Returns:
      Whether the video is exclusively used for copyright monitoring
    • setIsReferenceOnly

      public void setIsReferenceOnly​(Boolean isReferenceOnly)
      Whether the video is exclusively used for copyright monitoring.
    • getMusicVideoCopyright

      The music video copyright of this video because of a missing object description in the graph reference, we use a Map here
    • setMusicVideoCopyright

      public void setMusicVideoCopyright​(MusicVideoCopyright musicVideoCopyright)
      The music video copyright of this video because of a missing object description in the graph reference, we use a Map here
    • getReactions

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

      public void setReactions​(Reactions reactions)
      The reactions for this video.
    • getEmbeddable

      Whether the video is embeddable.
      Returns:
      Whether the video is embeddable.
    • setEmbeddable

      public void setEmbeddable​(Boolean embeddable)
      Whether the video is embeddable.
    • getEvent

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

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

      @GraphAPI(since="2.7") public String getFeedType()
      Whether or not the video is highlighted in Video Channel.
      Returns:
      Whether or not the video is highlighted in Video Channel.
    • setFeedType

      public void setFeedType​(String feedType)
      Whether or not the video is highlighted in Video Channel.
    • getUniversalVideoId

      The publishers asset management code for this video.
    • setUniversalVideoId

      public void setUniversalVideoId​(String universalVideoId)
      The publishers asset management code for this video.
    • getLikes

      public Likes getLikes()
      People who like this. you need to add the field to the fields query parameter to get the likes list otherwise null is returned
      Returns:
      People who like this
    • setLikes

      public void setLikes​(Likes likes)
      People who like this. you need to add the field to the fields query parameter to get the likes list otherwise null is returned
    • getPlace

      public Place getPlace()
      Location associated with the video, if any.
      Returns:
      Location associated with the video, if any.
    • setPlace

      public void setPlace​(Place place)
      Location associated with the video, if any.
    • getContentCategory

      The content category of this video.
      Returns:
      The content category of this video.
    • setContentCategory

      public void setContentCategory​(String contentCategory)
      The content category of this video.
    • getPicture

      public String getPicture()
      A URL for the thumbnail picture of the video.
      Returns:
      A URL for the thumbnail picture of the video.
    • setPicture

      public void setPicture​(String picture)
      A URL for the thumbnail picture of the video.
    • getIcon

      public String getIcon()
      An icon URL which represents the video.
      Returns:
      An icon URL which represents the video.
    • setIcon

      public void setIcon​(String icon)
      An icon URL which represents the video.
    • getSource

      public String getSource()
      A URL to the raw, playable video file.
      Returns:
      A URL to the raw, playable video file.
      Since:
      1.6.5
    • setSource

      public void setSource​(String source)
      A URL to the raw, playable video file.
      Since:
      1.6.5
    • getEmbedHtml

      public String getEmbedHtml()
      HTML that may be used to embed the video on another website.
      Returns:
      HTML that may be used to embed the video on another website.
    • setEmbedHtml

      public void setEmbedHtml​(String embedHtml)
      HTML that may be used to embed the video on another website.
    • getLength

      public Double getLength()
      The length of the video, in seconds.
      Returns:
      The length of the video, in seconds.
    • setLength

      public void setLength​(Double length)
      The length of the video, in seconds.
    • getLiveAudienceCount

      Number of unique people who watched the video broadcast when it was live.
      Returns:
      Number of unique people who watched the video broadcast when it was live.
    • setLiveAudienceCount

      public void setLiveAudienceCount​(Integer liveAudienceCount)
      Number of unique people who watched the video broadcast when it was live.
    • getLiveStatus

      The live status of the video. Possible values contain LIVE, LIVE_STOPPED, VOD
      Returns:
      The live status of the video
    • setLiveStatus

      public void setLiveStatus​(String liveStatus)
      The live status of the video. Possible values contain LIVE, LIVE_STOPPED, VOD
    • getPrivacy

      public Privacy getPrivacy()
      Privacy setting for the video.
      Returns:
      Privacy setting for the video.
    • setPrivacy

      public void setPrivacy​(Privacy privacy)
      Privacy setting for the video.
    • getPremiereLivingRoomStatus

      The status of the Premiere Watch Party, if any
    • setPremiereLivingRoomStatus

      public void setPremiereLivingRoomStatus​(String premiereLivingRoomStatus)
      The status of the Premiere Watch Party, if any
    • getStatus

      Object describing the status attributes of a video.
      Returns:
      Object describing the status attributes of a video.
    • setStatus

      public void setStatus​(Video.VideoStatus status)
      Object describing the status attributes of a video.
    • getPublished

      Whether a post about this video is published. This field is only accessible in Graph API 2.3 or later.
      Returns:
      whether a post about this video is published.
      Since:
      1.10.0
    • setPublished

      public void setPublished​(Boolean published)
      Whether a post about this video is published. This field is only accessible in Graph API 2.3 or later.
      Since:
      1.10.0
    • getBackdatedTime

      Back dated time
      Since:
      1.10.0
    • setBackdatedTime

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

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

      public void setBackdatedTimeGranularity​(String backdatedTimeGranularity)
      String that represents the back dated time granularity
      Since:
      1.10.0
    • getCreatedTime

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

      public void setCreatedTime​(Date createdTime)
      The time the video was initially published.
    • getUpdatedTime

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

      public void setUpdatedTime​(Date updatedTime)
      The last time the video or its caption were updated.
    • getScheduledPublishTime

      The time that the video is scheduled to be published. This field is only accessible in Graph API 2.3 or later.
      Returns:
      The time that the video is scheduled to be published.
      Since:
      1.10.0
    • setScheduledPublishTime

      public void setScheduledPublishTime​(Date scheduledPublishTime)
      The time that the video is scheduled to be published. This field is only accessible in Graph API 2.3 or later.
      Since:
      1.10.0