/FBBotKit

FBBotKit rewrites the API requests and response models for Facebook Page, aiding developers in the seamless implementation of applications related to the Facebook Page API.

Primary LanguageTypeScript

Welcome to FBBotKit 👋

Version License: ISC

FBBotKit rewrites the API requests and response models for Facebook Page, aiding developers in the seamless implementation of applications related to the Facebook Page API.

Install

npm install @hungs20/fbbotkit

Usage

Create bot

const bot = new FBBotKit({
            pageAccessToken: "",
            pageId: "",
            pageName: "",
            apiVersion: "18.0"
        });

Create menu

bot.setMessengerProfile(request: MessengerProfile)

Create personal

bot.setPersonal(request: PersonalProfile)

Delete personal

bot.deletePersonal(id: string)

Send message

bot.sendMessage(request: SendRequest)

Send text message

bot.sendTextMessage(recipientId: string, text: string)

Send attachment message

bot.sendAttachmentMessage(recipientId: string, type: 'image' | 'video' | 'audio' | 'file', url: string)

Send attachment message

bot.sendTemplateGeneric(recipientId: string, elements: ElementPayload[])

Send quick reply

bot.sendQuickReplies(recipientId: string, text: string, elements: SendQuickReply[])

Author

👤 Chu Hung

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!