Class MessageItem

java.lang.Object
com.restfb.types.webhook.messaging.MessageItem
All Implemented Interfaces:
InnerMessagingItem

public class MessageItem
extends Object
implements InnerMessagingItem
Represents the Message Callback
  • Constructor Details

  • Method Details

    • isLike

      public boolean isLike()
      The user may send a like and this method can be used to discover the three know versions of the sticker
      Returns:
      true if the user sent a like (thumb up sticker), false otherwise
    • hasAttachment

      public boolean hasAttachment()
      Returns whether the message contains an attachment.
      Returns:
      true if the message contains a attachment, false otherwise
    • hasQuickReply

      public boolean hasQuickReply()
      Returns whether the message contains a quick reply.
      Returns:
      true if the message contains a quick reply, false otherwise
    • hasNlp

      public boolean hasNlp()
      Returns whether the message contains a NLP result.
      Returns:
      true if the message contains a NLP result, false otherwise
    • isReply

      public boolean isReply()
      Returns wether the message is a reply to another message
      Returns:
      true if the message is a reply of another message, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMid

      public String getMid()
      Message ID
    • setMid

      public void setMid​(String mid)
      Message ID
    • getSeq

      Deprecated.
      https://messengerblog.com/platform-updates/introducing-messenger-platform-v1-3-and-new-ways-to-drive-the-conversation/ "Developers who previously relied on using seq ID for deduping can use mid instead, and those who were using it for ordering purposes can use timestamp instead."
      Message sequence number
    • setSeq

      @Deprecated public void setSeq​(Long seq)
      Deprecated.
      https://messengerblog.com/platform-updates/introducing-messenger-platform-v1-3-and-new-ways-to-drive-the-conversation/ "Developers who previously relied on using seq ID for deduping can use mid instead, and those who were using it for ordering purposes can use timestamp instead."
      Message sequence number
    • getText

      public String getText()
      Text of message
    • setText

      public void setText​(String text)
      Text of message
    • isEcho

      public boolean isEcho()
      Indicates the message sent from the page itself
    • setEcho

      public void setEcho​(boolean isEcho)
      Indicates the message sent from the page itself
    • getAppId

      public String getAppId()
      ID of the app from which the message was sent
    • setAppId

      public void setAppId​(String appId)
      ID of the app from which the message was sent
    • getMetadata

      public String getMetadata()
      Custom string passed to the Send API as the metadata field
    • setMetadata

      public void setMetadata​(String metadata)
      Custom string passed to the Send API as the metadata field
    • getQuickReply

    • setQuickReply

      public void setQuickReply​(QuickReplyItem quickReply)
    • getStickerId

      public String getStickerId()
    • setStickerId

      public void setStickerId​(String stickerId)
    • getAttachments

      Array containing attachment data
    • setAttachments

      public void setAttachments​(List<MessagingAttachment> attachments)
      Array containing attachment data
    • getNlp

      public NlpResult getNlp()
    • getReplyTo

      public ReplyTo getReplyTo()