
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
bot-messenger-node
Advanced tools
A Node.js toolkit facilitating the seamless incorporation and effective deployment of the Messenger API in crafting responsive chatbots.
Node Wrapper to various APIs from Facebook Messenger Platform.
Various components used when sending messages in Facebook Messenger are wrapped into Python objects to make them reusable and easy to use.
npm install bot-messenger-node
const { SendApi } = require('bot-messenger-node');
const sendApi = new SendApi('<page_access_token>');
const message = '<message>';
const recipientId = '<recipient_id>';
sendApi.send_text(message, recipientId)
Note: From Facebook regarding User IDs
These ids are page-scoped. These ids differ from those returned from Facebook Login apps which are app-scoped. You must use ids retrieved from a Messenger integration for this page in order to function properly.
Generic Template Messages allows you to add cool elements like images, text all in a single bubble.
const { SendApi, Elements, Element, Buttons, Button, POSTBACK } = require('bot-messenger-node');
const sendApi = new SendApi('<page_access_token>');
const elements = new Elements();
const buttons = new Buttons();
const button = new Button(POSTBACK, "My button");
buttons.add_button(button.getContent());
const element = new Element("My element", "The element's subtitle", '<image_url>', buttons.get_content());
elements.add_element(element.getContent());
sendApi.send_generic(elements.getContent(), '<recipient_id>')
const SendApi = require('bot-messenger-node');
const sendApi = new SendApi('<page_access_token>');
// To send an image
sendApi.send_image('<image_url>', '<recipient_id>')
// To send an audio
sendApi.send_audio('<audio_url>', '<recipient_id>')
// To send a video
sendApi.send_video('<video_url>', '<recipient_id>')
// To send a file
sendApi.send_file('<file_url>', '<recipient_id>')
FAQs
A Node.js toolkit facilitating the seamless incorporation and effective deployment of the Messenger API in crafting responsive chatbots.
The npm package bot-messenger-node receives a total of 6 weekly downloads. As such, bot-messenger-node popularity was classified as not popular.
We found that bot-messenger-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.