Fbmessenger
A Facebook Messenger Platform client for RingoJS
Install / Use
/learn @orfon/FbmessengerREADME
fbmessenger
Facebook Messenger Bot client for RingoJS. It provides a convenient interface to the HTTP-based Messenger Platform. The client has been tested with RingoJS 1.1.0 and newer. It supports almost all API methods of the Messenger Platform 2.0 and the Graph API v2.9 from April 18, 2017.
Example
const bot = new FBMessenger("inser_pagetoken_here");
bot.sendTextMessage(recipientId, "Servus, I'm a bot!");
bot.sendButtonTemplate(recipientId, "Hello!", [
{
"type": "web_url",
"title": "Open Link",
"url": "http://dev.ORF.at/"
},
{
"type": "postback",
"title": "Get More Info",
"payload": JSON.stringify({ event: "get_more" })
}
]);
You can also take a look at the test bot which implements a lot of features of the Messenger Platform.
API Reference
Non-Goals
The following APIs and methods are not implemented and not planned to be anytime soon:
- ID Matching API
- Payments
License
This package is licensed under the Apache License Version 2.0. You can copy, modify and distribute the bot client in source and/or binary form. Please mark all modifications clearly as being the work of the modifier.
Changelog
- 3.0.0 - implements changes for Messenger Platform v1.4 and v2.0, changed parameter order for templates, added message tags and changed parameter order for
sendXYZ()methods, removed old thread APIs, added basic test bot - 2.3.0 - support for batched requests to the Graph API
- 2.2.0 - adds support for Messenger Platform v1.3, new method
isReferral()in utils to detect referral webhook calls - 2.1.0 - minor bugfix in the attachment methods
- 2.0.0 - implements Messenger Platform v1.2, adds
sendReusableAttachment()method, breaking change: new signatures of allsendXyzAttachment()methods to send reusable attachments - 1.0.0 - initial release for Messenger Platform v1.1
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
