Skip to content

Instantly share code, notes, and snippets.

@ekalvi
Created September 14, 2016 21:45
Show Gist options
  • Save ekalvi/e2fca2f814e01fbd4470d0b0c21e463e to your computer and use it in GitHub Desktop.
Save ekalvi/e2fca2f814e01fbd4470d0b0c21e463e to your computer and use it in GitHub Desktop.
Messenger v1.2 examples
name: height
states:
compact:
component: meya.text_buttons
properties:
text: Testing different webview heights...
mode: quick_reply
buttons:
- text: Compact
url: https://meya.ai
type: link
webview_height_ratio: compact
- text: Tall
url: https://meya.ai
type: link
webview_height_ratio: tall
- text: Full
url: https://meya.ai
type: link
webview_height_ratio: full
name: image_reply
states:
text_buttons_state:
component: meya.text_buttons
properties:
text: What's your favorite currency?
output: currency
mode: quick_reply
buttons:
- text: Bitcoin
image_url: https://bitstickers.net/wp-content/uploads/2013/12/btc-mono1.jpg
action: next
- text: US Dollar
image_url: http://forexsignalsdirect.com/wp-content/uploads/2015/03/dollar.jpg
action: next
next_state:
component: meya.text
properties:
text: Me too! {{ flow.currency }} is my favorite.
name: location
states:
location:
component: meya.text_buttons
properties:
text: Where are you?
output: button_click
mode: quick_reply
buttons:
- type: location
- text: No, thanks
action: next
done:
component: meya.text
properties:
text: You're entitled to your privacy.
name: share
states:
card_state:
component: meya.card
properties:
title: 'Breaking News: Wicked bear on the loose!'
text: Don't worry, Kodiak bears aren't that dangerous. Just keep your
distance.
image_url: https://upload.wikimedia.org/wikipedia/commons/7/71/2010-kodiak-bear-1.jpg
output: button_click
buttons:
- type: share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment