Versions in this module Expand all Collapse all v1 v1.1.5 Oct 31, 2019 v1.1.4 Oct 31, 2019 Changes in this version type Messenger + func (m *Messenger) CheckIntegrity(r *http.Request) error v1.1.3 Oct 30, 2019 v1.1.2 Oct 30, 2019 Changes in this version + const AudioAttachment + const CompactTopElementStyle + const FileAttachment + const HorizontalImageAspectRatio + const ImageAttachment + const InboxPageID + const LargeTopElementStyle + const MessageTagType + const MessengerProfileURL + const NonPromotionalSubscriptionType + const ProfileURL + const ResponseType + const SendMessageURL + const SendSettingsURL + const SquareImageAspectRatio + const ThreadControlURL + const UpdateType + const VideoAttachment + const WebviewCompact + const WebviewFull + const WebviewTall + func NewVerifyHandler(token string) func(w http.ResponseWriter, r *http.Request) + func Respond(w http.ResponseWriter, code int) + type AccountLinking struct + AuthorizationCode string + Recipient Recipient + Sender Sender + Status string + Time time.Time + type AccountLinkingHandler func(AccountLinking, *Response) + type Action int + const AccountLinkingAction + const DeliveryAction + const OptInAction + const PostBackAction + const ReadAction + const ReferralAction + const TextAction + const UnknownAction + type Attachment struct + Payload Payload + Title string + Type string + URL string + type AttachmentType string + type CallToActionsItem struct + MessengerExtension bool + Payload string + Title string + Type string + URL string + WebviewHeightRatio string + type CallToActionsSetting struct + CallToActions []CallToActionsItem + SettingType string + ThreadState string + type Coordinates struct + Lat float64 + Long float64 + type DefaultAction struct + FallbackURL string + MessengerExtensions bool + Type string + URL string + WebviewHeightRatio string + WebviewShareButton string + type Delivery struct + Mids []string + RawWatermark int64 + Seq int + func (d Delivery) Watermark() time.Time + type DeliveryHandler func(Delivery, *Response) + type Entry struct + ID int64 + Messaging []MessageInfo + Time int64 + type GreetingInfo struct + Text string + type GreetingSetting struct + Greeting GreetingInfo + SettingType string + type HomeURL struct + InTest bool + URL string + WebviewHeightRatio string + WebviewShareButton string + type ImageAspectRatio string + type Message struct + Attachments []Attachment + IsEcho bool + Mid string + NLP json.RawMessage + QuickReply *QuickReply + Recipient Recipient + Sender Sender + Seq int + StickerID int + Text string + Time time.Time + func (m *Message) GetNLP(i interface{}) error + type MessageData struct + Attachment *StructuredMessageAttachment + QuickReplies []QuickReply + Text string + type MessageHandler func(Message, *Response) + type MessageInfo struct + AccountLinking *AccountLinking + Delivery *Delivery + Message *Message + OptIn *OptIn + PostBack *PostBack + Read *Read + Recipient Recipient + ReferralMessage *ReferralMessage + Sender Sender + Timestamp int64 + type MessagingType string + type Messenger struct + func New(mo Options) *Messenger + func (m *Messenger) Attachment(to Recipient, dataType AttachmentType, url string, messagingType MessagingType, ...) error + func (m *Messenger) CallToActionsSetting(state string, actions []CallToActionsItem) error + func (m *Messenger) Dispatch(r Receive) + func (m *Messenger) EnableChatExtension(homeURL HomeURL) error + func (m *Messenger) GreetingSetting(text string) error + func (m *Messenger) Handle(w http.ResponseWriter, r *http.Request) + func (m *Messenger) HandleAccountLinking(f AccountLinkingHandler) + func (m *Messenger) HandleDelivery(f DeliveryHandler) + func (m *Messenger) HandleMessage(f MessageHandler) + func (m *Messenger) HandleOptIn(f OptInHandler) + func (m *Messenger) HandlePostBack(f PostBackHandler) + func (m *Messenger) HandleRead(f ReadHandler) + func (m *Messenger) HandleReferral(f ReferralHandler) + func (m *Messenger) Handler() http.Handler + func (m *Messenger) ProfileByID(id int64, profileFields []string) (Profile, error) + func (m *Messenger) Response(to int64) *Response + func (m *Messenger) Send(to Recipient, message string, messagingType MessagingType, tags ...string) error + func (m *Messenger) SendGeneralMessage(to Recipient, elements *[]StructuredMessageElement, ...) error + func (m *Messenger) SendWithReplies(to Recipient, message string, replies []QuickReply, ...) error + type OptIn struct + Recipient Recipient + Ref string + Sender Sender + Time time.Time + type OptInHandler func(OptIn, *Response) + type Options struct + AppSecret string + Mux *http.ServeMux + Token string + Verify bool + VerifyToken string + WebhookURL string + type Payload struct + Coordinates *Coordinates + URL string + type PostBack struct + Payload string + Recipient Recipient + Referral Referral + Sender Sender + Time time.Time + type PostBackHandler func(PostBack, *Response) + type Profile struct + FirstName string + Gender string + LastName string + Locale string + Name string + ProfilePicURL string + Timezone float64 + type QueryError struct + Code int + ErrorSubcode int + FBTraceID string + Message string + Type string + func (e QueryError) Error() string + type QueryResponse struct + Error *QueryError + Result string + type QuickReply struct + ContentType string + Payload string + Title string + type Read struct + RawWatermark int64 + Seq int + func (r Read) Watermark() time.Time + type ReadHandler func(Read, *Response) + type Receive struct + Entry []Entry + Object string + type Recipient struct + ID int64 + type Referral struct + Ref string + Source string + Type string + type ReferralHandler func(ReferralMessage, *Response) + type ReferralMessage struct + Recipient Recipient + Sender Sender + Time time.Time + type Response struct + func (r *Response) Attachment(dataType AttachmentType, url string, messagingType MessagingType, ...) error + func (r *Response) AttachmentData(dataType AttachmentType, filename string, filedata io.Reader) error + func (r *Response) AttachmentWithReplies(attachment *StructuredMessageAttachment, replies []QuickReply, ...) error + func (r *Response) ButtonTemplate(text string, buttons *[]StructuredMessageButton, messagingType MessagingType, ...) error + func (r *Response) DispatchMessage(m interface{}) error + func (r *Response) GenericTemplate(elements *[]StructuredMessageElement, messagingType MessagingType, ...) error + func (r *Response) Image(im image.Image) error + func (r *Response) ListTemplate(elements *[]StructuredMessageElement, messagingType MessagingType, ...) error + func (r *Response) PassThreadToInbox() error + func (r *Response) SenderAction(action string) error + func (r *Response) SetToken(token string) + func (r *Response) Text(message string, messagingType MessagingType, tags ...string) error + func (r *Response) TextWithReplies(message string, replies []QuickReply, messagingType MessagingType, ...) error + type SendMessage struct + Message MessageData + MessagingType MessagingType + Recipient Recipient + Tag string + type SendSenderAction struct + Recipient Recipient + SenderAction string + type SendStructuredMessage struct + Message StructuredMessageData + MessagingType MessagingType + Recipient Recipient + Tag string + type Sender struct + ID int64 + type StructuredMessageAttachment struct + Payload StructuredMessagePayload + Title string + Type AttachmentType + URL string + type StructuredMessageButton struct + FallbackURL string + MessengerExtensions bool + Payload string + ShareContents *StructuredMessageData + Title string + Type string + URL string + WebviewHeightRatio string + WebviewShareButton string + type StructuredMessageData struct + Attachment StructuredMessageAttachment + type StructuredMessageElement struct + Buttons []StructuredMessageButton + DefaultAction *DefaultAction + ImageURL string + ItemURL string + Subtitle string + Title string + type StructuredMessagePayload struct + AttachmentID string + Buttons *[]StructuredMessageButton + Elements *[]StructuredMessageElement + ImageAspectRatio ImageAspectRatio + Sharable bool + TemplateType string + Text string + TopElementStyle TopElementStyle + Url string + type TopElementStyle string