botbuilder-facebook-thumbs-up

1.0.0 • Public • Published

Facebook Thumbs Up Checker for Microsoft Bot Framework

Short sample

const thumbsUp = require('botbuilder-facebook-thumbs-up');
 
// Check whether the user pressed the Facebook Thumbs Up
// button in Messenger, and respond appropriately:
if (thumbsUp.isThere(session)) {
  session.send('Haha thanks!');
} else {
  // Do the usual bot logic
}
 

What's it for?

This package provides a way to check whether the user sent a "Thumbs Up" to your bot in Facebook Messenger by clicking the Thumbs Up button. It works with bots written in Node.js using Microsoft Bot Framework (see the botbuilder package).

There is only one method called isThere(), which returns true if the user sent Thumbs Up, and false in all other cases.

In case you need it, thumbsUp.FULL_URL contains the full URL of the Facebook thumbs up icon (a PNG file).

Comments and suggestions

If you have any comments, contact me here: https://github.com/catcher-in-the-try/

Package Sidebar

Install

npm i botbuilder-facebook-thumbs-up

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • anton-ivanov