Package com.restfb.types
Class Message
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.FacebookType
com.restfb.types.Message
- All Implemented Interfaces:
HasCreatedTime
,HasFrom
,HasMessage
,Serializable
Represents the Message Graph API type
.
- Author:
- Mark Allen, Felipe Kurkowski, alockhart
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents an attached file that you may find on a private message.static class
static class
Additional attachment information, only present when an attached file is an image.static class
static class
Represents the Message Share Graph API type.static class
static class
static class
static class
Additional attachment information, only present when an attached file is a video.Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAttachment
(Message.Attachment attachment) boolean
addReaction
(Message.Reaction reaction) boolean
addShare
(Message.Share share) boolean
boolean
addTo
(ExtendedReferenceType receiver) The attachments associated with the message.The time the message was initially created.getFrom()
The sender of this messageThe text of the messageReaction (like/love) on the existing messageThe shares associated with the message.Sticker contained in the message.getStory()
The subject of the message.getTags()
A set of tags indicating the message folder and source of the message.getTo()
A list of recipients of the message.The "unread" count for this message.Whether this message has been seen.The time of the last update to this message.boolean
boolean
removeAttachment
(Message.Attachment attachment) boolean
removeReaction
(Message.Reaction reaction) boolean
removeShare
(Message.Share share) boolean
boolean
removeTo
(ExtendedReferenceType receiver) void
setCreatedTime
(Date createdTime) The time the message was initially created.void
setFrom
(ExtendedReferenceType from) The sender of this messagevoid
setMessage
(String message) The text of the messagevoid
setSticker
(String sticker) Sticker contained in the message.void
setStory
(Message.Story story) void
setSubject
(String subject) The subject of the message.void
The "unread" count for this message.void
Whether this message has been seen.void
setUnsupported
(boolean isUnsupported) void
setUpdatedTime
(Date updatedTime) The time of the last update to this message.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
-
Message
public Message()
-
-
Method Details
-
getAttachments
The attachments associated with the message.- Returns:
- The attachments associated with the message.
-
addAttachment
-
removeAttachment
-
getTo
A list of recipients of the message.- Returns:
- A list of the message recipients
-
addTo
-
removeTo
-
getTags
A set of tags indicating the message folder and source of the message.- Returns:
- A set of tags indicating the message folder and source of the message.
-
addTag
-
removeTag
-
getReactions
Reaction (like/love) on the existing message- Returns:
- list of reactions
-
addReaction
-
removeReaction
-
getCreatedTime
The time the message was initially created.- Specified by:
getCreatedTime
in interfaceHasCreatedTime
- Returns:
- The time the message was initially created.
-
setCreatedTime
The time the message was initially created. -
getSubject
The subject of the message.- Returns:
- The subject of the message.
-
setSubject
The subject of the message. -
getFrom
The sender of this message -
setFrom
The sender of this message -
isUnsupported
-
setUnsupported
-
getMessage
The text of the message- Specified by:
getMessage
in interfaceHasMessage
- Returns:
- The text of the message
-
setMessage
The text of the message -
getSticker
Sticker contained in the message.- Returns:
- The Sticker in that message
-
setSticker
Sticker contained in the message. -
getStory
-
setStory
-
getUpdatedTime
The time of the last update to this message.- Returns:
- The time of the last update to this message.
-
setUpdatedTime
The time of the last update to this message. -
getUnread
The "unread" count for this message.- Returns:
- The "unread" count for this message.
-
setUnread
The "unread" count for this message. -
getUnseen
Whether this message has been seen.- Returns:
- Whether this message has been seen.
-
setUnseen
Whether this message has been seen.
-