From 32f57277c9ec7a34ba826945a0dde99d04b250a6 Mon Sep 17 00:00:00 2001 From: Ouadie Lahdioui Date: Thu, 17 Aug 2017 15:10:21 +0200 Subject: [PATCH] Add documentattion --- docs/readme-facebook.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/readme-facebook.md b/docs/readme-facebook.md index 86587674c..98bc37201 100644 --- a/docs/readme-facebook.md +++ b/docs/readme-facebook.md @@ -539,6 +539,28 @@ var attachment = { ``` +## Message Tags + +Adding a tag to a message allows you to send it outside the 24+1 window. + +View the facebook [documentation](https://developers.facebook.com/docs/messenger-platform/messenger-profile/home-url) for more details. + +- Get all tags : +```javascript +controller.api.tags.get_all(function (tags) { + // use tags.data +}); +``` + +- Send a tagged message : +```javascript +var taggedMessage = { + "text": "Hello Botkit !", + "tag": "RESERVATION_UPDATE" +}; +bot.reply(message, taggedMessage); +``` + ## Use BotKit for Facebook Messenger with an Express web server Instead of the web server generated with setupWebserver(), it is possible to use a different web server to receive webhooks, as well as serving web pages.