Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fb-msg-bot

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fb-msg-bot

Facebook Messenger Bot Api

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

fb-msg-bot

=========

npm package

Librería que permite usar de manera mas facil la api de Facebook para crear bots de Messenger. Permite las siguientes funcionalidades: Enviar Mensaje de texto (sendTextMessage) Enviar Mensaje Complejo (sendGenericMessage) Obtener Perfil del usuario (getProfile)

Instalación

npm install fb-msg-bot --save

Uso

Enviar Mensaje de texto

Permite enviar un mensaje de texto por el bot de facebook pasando el id del usuario.

var FacebookMsgBot = require('fb-msg-bot');
var facebookMsgBot = new FacebookMsgBot('YOUR_TOKEN');
facebookMsgBot.sendTextMessage('id_user', 'Hola Test', function(error,response){
  'use strict';
  if(error){
    console.log(error);
  }else{
    console.log(response);
  }
});

Enviar Mensaje de texto generico.

var FacebookMsgBot = require('fb-msg-bot');
var facebookMsgBot = new FacebookMsgBot('YOUR_TOKEN');
facebookMsgBot.sendGenericMessage('id_user', {'text':'Hola'}, function(error,response){
  'use strict';
  if(error){
    console.log(error);
  }else{
    console.log(response);
  }
});

Obtener Perfil.

var FacebookMsgBot = require('fb-msg-bot');
var facebookMsgBot = new FacebookMsgBot('YOUR_TOKEN');
facebookMsgBot.getProfile('id_user', function(error,response){
  'use strict';
  if(error){
    console.log(error);
  }else{
    console.log(response);
  }
});

References

Release History

  • 1.0.0 Initial release

Keywords

FAQs

Package last updated on 08 Jun 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc