Class PostbackItem

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

public class PostbackItem
extends Object
implements InnerMessagingItem
Represents a receiving postback object as defined here: https://developers.facebook.com/docs/messenger-platform/webhook-reference/postback
  • Constructor Details

  • Method Details

    • toString

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

      public String getTitle()
      Title for the CTA that was clicked on. This is sent to all apps subscribed to the page. For apps other than the original CTA sender, the postback event will be delivered via the standby channel.
    • setTitle

      public void setTitle​(String title)
      Title for the CTA that was clicked on. This is sent to all apps subscribed to the page. For apps other than the original CTA sender, the postback event will be delivered via the standby channel.
    • getPayload

      public String getPayload()
      payload parameter that was defined with the button
    • setPayload

      public void setPayload​(String payload)
      payload parameter that was defined with the button
    • getReferral

      Comes only with Get Started postback and if an optional ref param was passed from the entry point, such as m.me link.
    • setReferral

      public void setReferral​(PostbackReferral referral)
      Comes only with Get Started postback and if an optional ref param was passed from the entry point, such as m.me link.