messenger_generic_template
Allows the creation of messages from Messenger Generic Templates.
Last updated
Was this helpful?
Allows the creation of messages from Messenger Generic Templates.
Last updated
Was this helpful?
Was this helpful?
messenger_generic_template(elements=Hash|Array, image_aspect_ration=Enum, quick_replies=Array)
Messenger
Telegram
@reply.messenger_generic_template(
{
title: "The Title",
subtitle: "This is the subtitle",
image_url: "https://pbs.twimg.com/profile_images/1533726469641338881/Q9dM6DpM_400x400.jpg",
default_action: {
type: :web_url,
url: "https://kogno.io",
:webview_height_ratio => :tall,
messenger_extensions: true
},
buttons: [
{
type: :web_url,
url: "https://kogno.io",
title: "Call to Action ➡️",
webview_height_ratio: :tall,
messenger_extensions: true
}
]
},
:square,
[
{
title: "Button bellow",
payload: "some_context/some_payload"
}
]
)
elements
Hash|Array
Required.
Can be Hash or an Array of Hashes. View the full structure of elements
in Messenger Platform documentation.
image_aspect_ratio
Enum
Optional.
The aspect ratio used to render images specified by element.image_url
. Must be horizontal
(1.91:1) or square
(1:1). Defaults to horizontal
.
quick_replies
Array
Optional. Array of buttons that appear below the carousel.