A Facebook Messenger API wrapper written in Golang, alternative to pymessenger.
- Send raw message - SendRawMessage(payload)
- Send action - SendAction(recipientId, action, notificationType)
- Send message - SendMessage(recipientId, message)
- Send text message - SendTextMessage(recipientId, text)
- Send quick replies - SendQuickReplies(recipientId, text, quickReplies)
- Send attachment message - SendAttachmentMessage(recipientId, attachment)
- Send attachment with url - SendAttachmentUrl(recipientId, attachmentType)
- Send generic message - SendGenericMessage(recipientId, elements)
- Send button message - SendButtonMessage(recipientId, text, buttons)
- Send image with url - SendImageUrl(recipientId, imageUrl)
- Send audio with url - SendAudioUrl(recipientId, audioUrl)
- Send video with url - SendVideoUrl(recipientId, videoUrl)
- Send file with url - SendFileUrl(recipientId, fileUrl)
- Set get started button - SetGetStarted(gsPayload)
- Remove get started button - RemoveGetStarted()
- Set persistent menu - SetPersistentMenu(pmPayload)
- Remove persistent menu - RemovePersistentMenu()
go get -u github.com/imbaggaarm/go-messenger
import messenger "github.com/imbaggaarm/go-messenger"
apiVersion := messenger.DefaultApiVersion // or the version that you want
bot = messenger.NewBot(accessToken, apiVersion)
textMessage := "Hello! Can you hear me?"
bot.sendTextMessage(recipientId, textMessage)
- fb-stranger-bot is a template project for chat-with-stranger chatbot.
- VNUChatbot is a chat-with-stranger chatbot for university students.
There are a lot of missing functions in this package, I'm planning to make this better and better in the future. Here are some things will be implemented soon:
- Attachment with file messages
Follow and contact me on Twitter. If you find an issue, just open a ticket. Pull requests are warmly welcome as well.