@hungs20/fbbotkit
v1.0.0
Published
facebook page bot kit
Downloads
1
Readme
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
- Website: https://chuhung.net
- Github: @Hungs20
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!