Giter Club home page Giter Club logo

fbmessenger's Introduction

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 all sendXyzAttachment() methods to send reusable attachments
  • 1.0.0 - initial release for Messenger Platform v1.1

fbmessenger's People

Contributors

botic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fbmessenger's Issues

Add support for Messenger Platform 1.2

  • Webview and Extensions
  • webview_height_ratio in URL buttons
  • Share Buttons
  • Image Quick Reply
  • Location Quick Reply
  • Attachment Reuse
  • Payments / Buy Button Template

Payments require the participation in the Messenger platform beta program. Since we have no plan to do this, I consider only a basic implementation as necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.