TemplateSendMessage - ImageCarouselTemplate
image_carousel_template_message = TemplateSendMessage(
alt_text='ImageCarousel template',
template=ImageCarouselTemplate(
columns=[
ImageCarouselColumn(
image_url='https://example.com/item1.jpg',
action=PostbackAction(
label='postback1',
display_text='postback text1',
data='action=buy&itemid=1'
)
),
ImageCarouselColumn(
image_url='https://example.com/item2.jpg',
action=PostbackAction(
label='postback2',
display_text='postback text2',
data='action=buy&itemid=2'
)
)
]
)
)
Image carousel template
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.
type
String Required
image_carousel
跟旋轉木馬相同欄位最多10個
columns
Array of column objects Required
Array of columns
Max columns: 10
模板只能用矩形的
Column object for image carousel
imageUrl
String Required
Image URL (Max character limit: 2,000)
HTTPS over TLS 1.2 or later
JPEG or PNG
Aspect ratio: 1:1
Max width: 1024px
Max file size: 10 MB
當圖片被按下後的動作及圖片的表現
action
Action object Required
Action when image is tapped