Hungs20 / 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

🏠 Homepage

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!

About

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.


Languages

Language:TypeScript 100.0%