This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
How to send template message to user like in FB #32
Labels
Comments
You should create a Card Component for your widget |
@adantoscano how should I create it, is there any documentation reference?can you show some example, please ? |
In this project, public/ folder is for Widget purposes and you're free to customize it. Take a look how quick replies works in public/client.js and try to do the same with cards. //client.js
that.on('message', function(message) {
that.clearReplies();
if (message.quick_replies) {
var list = document.createElement('ul');
var elements = [];
for (var r = 0; r < message.quick_replies.length; r++) {
(function(reply) {
var li = document.createElement('li');
var el = document.createElement('a');
el.innerHTML = reply.title;
el.href = '#';
el.onclick = function() {
that.quickReply(reply.payload);
}
li.appendChild(el);
list.appendChild(li);
elements.push(li);
})(message.quick_replies[r]);
} Start adding Hope this helps you |
@adantoscano what about webViews? is three webView available currently? |
That's maybe harder... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I used Botkit for FB bot ,this is code from FB bot, how can you create templates like this for Web bot?
The text was updated successfully, but these errors were encountered: