Crates.io | rmessenger |
lib.rs | rmessenger |
version | 0.0.4 |
source | src |
created_at | 2016-09-29 12:29:46.74824 |
updated_at | 2016-10-04 06:32:56.071525 |
description | A Rust Wrapper for the FaceBook Messenger Bot API |
homepage | |
repository | https://github.com/nocotan/rmessenger |
max_upload_size | |
id | 6661 |
size | 7,732 |
##A Rust Wrapper for the FaceBook Messenger Bot API
Facebook's Messenger Platform
crates.io: rmessenger
###About you can:
###Installation
####Cargo.toml
rmessenger = "0.0.3"
###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