|
請加入這個範例的官方帳號
![]() |
![]() |
---|---|
Android | iOS |
![]() |
![]() |
---|---|
Android | iOS |
![]() |
![]() |
---|---|
Android | iOS |
liff.sendMessages([{ "type": "flex", "altText": "test", "contents": { "type": "bubble", "body": { "type": "box", "layout": "vertical", "contents": [{ "type": "button", "action": { "label": "message", "text": "message", "type": "message" } }] } } }]).catch(err => { alert(err.message) })
liff.sendMessages([{ "type": "flex", "altText": "test", "contents": { "type": "bubble", "body": { "type": "box", "layout": "vertical", "contents": [{ "type": "button", "action": { "data": "postback", "label": "postback", "type": "postback" } }] } } }]).catch(err => { alert(err.message) })
liff.sendMessages([{ "type": "flex", "altText": "test", "contents": { "type": "bubble", "body": { "type": "box", "layout": "vertical", "contents": [{ "type": "button", "action": { "label": "uri", "type": "uri", "uri": "https://www.google.com" } }] } } }]).catch(err => { alert(err.message) })
type=uri
[
{
"originalContentUrl": "https://i.imgur.com/9CtzqdW.png",
"previewImageUrl": "https://i.imgur.com/9CtzqdW.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/OoTN0ki.png",
"previewImageUrl": "https://i.imgur.com/OoTN0ki.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/mPZRvfa.png",
"previewImageUrl": "https://i.imgur.com/mPZRvfa.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/WI8KXOb.png",
"previewImageUrl": "https://i.imgur.com/WI8KXOb.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/ay5To6z.png",
"previewImageUrl": "https://i.imgur.com/ay5To6z.png",
"type": "image"
}
]
![]() |
![]() |
---|---|
Android | iOS |
liff.sendMessages([{ type: 'image', originalContentUrl: 'https://i.imgur.com/MwS42AE.png?sender=Brown', previewImageUrl: 'https://i.imgur.com/MwS42AE.png?sender=Brown' }]).catch(err => { alert(err.message) })
{
"type": "message",
"replyToken": "bfd16af576304062931ee39249d1c362",
"source": {
"userId": "Udeadbeefdeadbeefdeadbeefdeadbeef",
"type": "user"
},
"timestamp": 1586196950201,
"mode": "active",
"message": {
"type": "image",
"id": "11738027154079",
"contentProvider": {
"type": "external",
"originalContentUrl": "https://i.imgur.com/MwS42AE.png?sender=Brown",
"previewImageUrl": "https://i.imgur.com/MwS42AE.png?sender=Brown"
}
}
}
請加入這個工具的官方帳號
直接顯示收到的 Event JSON
貼上 Message Object 就直接 reply
{
"type": "text",
"text": "Hello world"
}
![]() |
![]() |
---|---|
Android | iOS |
[
{
"originalContentUrl": "https://i.imgur.com/9CtzqdW.png",
"previewImageUrl": "https://i.imgur.com/9CtzqdW.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/OoTN0ki.png",
"previewImageUrl": "https://i.imgur.com/OoTN0ki.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/mPZRvfa.png",
"previewImageUrl": "https://i.imgur.com/mPZRvfa.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/WI8KXOb.png",
"previewImageUrl": "https://i.imgur.com/WI8KXOb.png",
"type": "image"
},
{
"originalContentUrl": "https://i.imgur.com/ay5To6z.png",
"previewImageUrl": "https://i.imgur.com/ay5To6z.png",
"type": "image"
}
]
![]() |
![]() |
---|---|
Android | iOS |
從 Flex Message Simulator
直接貼上複製下來的 JSON
![]() |
![]() |
---|---|
Android | iOS |
![]() |
![]() |
---|---|
Android | iOS |
![]() |
![]() |
---|---|
Android | iOS |