rmessenger 0.0.3

A Rust Wrapper for the FaceBook Messenger Bot API
Documentation

rmessenger

MIT License

##A Rust Wrapper for the FaceBook Messenger Bot API Facebook's Messenger Platform
Cargo

###About you can:

  • send text message
  • send generic message
  • send button message

###Installation

####Cargo.toml

rmessenger = "0.0.1"

###Usage

####Send text message https://developers.facebook.com/docs/messenger-platform/send-api-reference/text-message

extern crate rmessenger;
use rmessenger::bot;

fn main() {
    let bot = bot::Bot::new("<YOUR ACCESS TOKEN>", "<YOUR APP SECRET>");
    bot.send_text_message("<recipient_id>", "<message>");
}

####Send generic message

extern crate rmessenger;
use rmessenger::bot;

fn main() {
    let bot = bot::Bot::new("<YOUR ACCESS TOKEN>", "<YOUR APP SECRET>");
    bot.send_generic_message("<recipient_id>>",
                             "[{'title': 'example',
                                'image_url': 'https://petersfancybrownhats.com/company_image.png'
                                }]");
}

elements param is &str

###TODO

  • send image
  • send file