Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateButtonElements(title string, subtitle string, imgURL string, options []string) (elements []*fbmodelsend.TemplateElement)
- func GenerateQuickReplyOptions(opcoes []string) (qrf []*fbmodelsend.QuickReply, err error)
- func GetUserData(senderID string, accessToken string) (*fbmodelsend.User, error)
- func SendAskUserLocation(text string, recipient string, accessToken string, msgType int) (err error)
- func SendAudioMessage(url string, recipient string, accessToken string, msgType int) (err error)
- func SendButtonMessage(template []*fbmodelsend.Button, text string, recipient string, ...) (err error)
- func SendGenericTemplateMessage(template []*fbmodelsend.TemplateElement, recipient string, accessToken string, ...) (err error)
- func SendImageMessage(url string, recipient string, accessToken string, msgType int) (err error)
- func SendPersonalFinanceUpdateMessage(text string, recipient string, accessToken string) (err error)
- func SendQuickReply(text string, options []*fbmodelsend.QuickReply, recipient string, ...) (err error)
- func SendTextMessage(text string, recipient string, accessToken string, msgType int) (err error)
- func SendTypingMessage(onoff bool, recipient string, accessToken string, msgType int) (err error)
- func SendURLButtonMessage(text string, buttonTitle string, URL string, recipient string, ...) (err error)
- func VerifySignature(appSecret string, bytes []byte, expectedSignature string) bool
Constants ¶
const MessageTypeMessageTag = 3
MessageTypeMessageTag is non-promotional and is being sent outside the 24-hour standard messaging window with a message tag.
const MessageTypeResponse = 1
MessageTypeResponse is in response to a received message.
const MessageTypeUpdate = 2
MessageTypeUpdate is being sent proactively and is not in response to a received message.
Variables ¶
var ErrInvalidCallToFacebook = errors.New("")
ErrInvalidCallToFacebook is specific error when Facebook Messenger returns error after being called
Functions ¶
func GenerateButtonElements ¶
func GenerateButtonElements(title string, subtitle string, imgURL string, options []string) (elements []*fbmodelsend.TemplateElement)
GenerateButtonElements generates Messenger buttons
func GenerateQuickReplyOptions ¶
func GenerateQuickReplyOptions(opcoes []string) (qrf []*fbmodelsend.QuickReply, err error)
GenerateQuickReplyOptions generates quick replies based on string slices with defitions. Format: title#payload
func GetUserData ¶
func GetUserData(senderID string, accessToken string) (*fbmodelsend.User, error)
GetUserData - Get Facebook User's data. It can be obtained after she starts a conversation with Bot
func SendAskUserLocation ¶
func SendAskUserLocation(text string, recipient string, accessToken string, msgType int) (err error)
SendAskUserLocation sends small message asking the users their location
func SendAudioMessage ¶
SendAudioMessage - Sends audio message to a recipient on Facebook Messenger
func SendButtonMessage ¶
func SendButtonMessage(template []*fbmodelsend.Button, text string, recipient string, accessToken string, msgType int) (err error)
SendButtonMessage - Sends a generic rich message to Facebook user. It can include text, buttons, URLs Butttons, lists to reply
func SendGenericTemplateMessage ¶
func SendGenericTemplateMessage(template []*fbmodelsend.TemplateElement, recipient string, accessToken string, msgType int) (err error)
SendGenericTemplateMessage - Sends a generic rich message to Facebook user. It can include text, buttons, URLs Butttons, lists to reply
func SendImageMessage ¶
SendImageMessage - Sends image message to a recipient on Facebook Messenger
func SendPersonalFinanceUpdateMessage ¶
func SendPersonalFinanceUpdateMessage(text string, recipient string, accessToken string) (err error)
SendPersonalFinanceUpdateMessage sends a Finance Update information to recipient
func SendQuickReply ¶
func SendQuickReply(text string, options []*fbmodelsend.QuickReply, recipient string, accessToken string, msgType int) (err error)
SendQuickReply sends small messages in order to get small and quick answers from the users
func SendTextMessage ¶
SendTextMessage - Send text message to a recipient on Facebook Messenger
func SendTypingMessage ¶
SendTypingMessage - Sends typing message to user
Types ¶
This section is empty.