Socket
Socket
Sign inDemoInstall

facebook-messenjs

Package Overview
Dependencies
128
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "facebook-messenjs",
"version": "0.1.2",
"version": "0.1.3",
"description": "API wrapper for Facebook Messenger inspired by discord.js",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -13,2 +13,6 @@ const EventEmitter = require('events');

* @param {Object} options JSON object with necessary options
* @param {String} options.pageToken Page token from Facebook
* @param {String} options.verifyToken Token for confirming the API to Facebook
* @param {String} [options.appSecret] App secret of the app
* @param {String} options.appID ID of application of chatbot from Facebook
* @property {MessageManager} messageManager Property of object for storing messages

@@ -18,2 +22,3 @@ * @property {ProfileManager} profileManager Property of object for storing profiles

* @property {String} verifyToken Token for confirming the API to Facebook
* @property {String} appSecret App secret of the app
* @property {String} appID ID of application of chatbot from Facebook

@@ -32,3 +37,11 @@ * @property {number} port port of API bot

this.appSecret = options.appSecret;
this.validation = makeDefault(options.validation, true);
if (options.validation != null) {
if ((options.validation) && (!options.appSecret)) {
throw new Error("Validation needs app secret");
} else {
this.validation = options.validation;
}
} else {
this.validation = options.appSecret != null;
}
this.path = makeDefault(options.path, "/");

@@ -35,0 +48,0 @@ if ("appID" in options) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc