Use @Format
Use formats
Quick response
Show quick answers like this:
@Event('start')
start() {
@Format('quickReplies', ['yes', 'no'])
> Continue ?
Prompt()
> Ok !
}Carousel
Here's how to display a carousel:
@Event('start')
start() {
@Format('carousel', [
{
title: 'TITLE',
subtitle: 'SUBTITLE',
image: 'URL_IMAGE',
buttons: [
{
url: 'URL',
title: 'TITLE BUTTON'
}
]
}
])
> Continue ?
}Display an image
Send text with buttons
Webview
Create an
webviewsfolder at the root of the projectPut an HTML file (eg
webviews/map.html)
Share button
On Facebook Messenger, NewBot ChatBox and Twitter, we can share content with the following code
On Twitter
On Twitter, let's add the tweet property:
tweet.text(required): Text in the tweettweet.url(optional): Url to sharetweet.via(optional): User Profile to Sharetweet.hashtags(optional): Embed Hashtags
Show a video
Send a contact
Last updated
Was this helpful?