## Flex 開發人員工具
## richmenuswitch 新功能範例
###### [`hackmd.io/@taichunmin/chatbot-tw-202107`](https://hackmd.io/@taichunmin/chatbot-tw-202107)
###### 戴均民 @ chatbot.tw
---
## Who am I?
<table class="about-me">
<tr>
<td><img src="https://www.gravatar.com/avatar/8d9b432d861e4ac0e40954a800ae90a1?s=2048" class="avatar"></td>
<td>
<ul>
<li>戴均民</li>
<li>現職 <span style="color: #e2231a">微程式資訊</span></li>
<li>LINE 認證的 API Expert</li>
<li><a href="https://taichunmin.idv.tw/liff-businesscard/" target="_blank">LINE 數位版名片</a></li>
<li><a href="https://lihi1.com/l5Dld/coscup-2020" target="_blank"><i class="fa fa-fw fa-rss-square"></i>筆記國度 (部落格)</a></li>
<li><a href="https://github.com/taichunmin/" target="_blank"><i class="fa fa-fw fa-github"></i>taichunmin</a></li>
</ul>
</td>
</tr>
</table>
<style>
img.avatar {
border-radius: 50%;
width: 300px;
}
</style>
---
## Flex 開發人員工具
![](https://i.imgur.com/cP5purz.png)
###### [`line.me/R/ti/p/@736cebrk`](https://line.me/R/ti/p/@736cebrk)
---
## 這是受[卡米哥](https://medium.com/@EtrexKuo)啟發
## 而寫出來的工具
---
# 主要功能
---
## 功能 1
直接顯示收到的 Event JSON
![](https://i.imgur.com/uSuzESF.png =x450)
---
## DEMO 一對一聊天
* follow
* location
* [`01-postback`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-01-postback-json)
* stickers
* videoPlayComplete
[`02-countdown.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-02-countdown-json)
---
## DEMO 多人聊天室
* mentions
* join
* member join/leave
---
## DEMO 群組聊天
* mentions
* join
* member join/leave
---
## 功能 2
貼上 <span style="color: gold">Message Object</span> 就直接 reply
---
## [`03-text.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-03-text-json)
![](https://i.imgur.com/UhMp3bW.png =x500)
---
| ![](https://i.imgur.com/pCQy2Jd.jpg =x500) | ![](https://i.imgur.com/m0mf4mR.png =x500) |
| :-----: | :-: |
| Android | iOS |
---
#### [`04-images.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-04-images-json)
| ![](https://i.imgur.com/FQgaJHd.jpg =x500) | ![](https://i.imgur.com/UovGZ7B.png =x500) |
| :-----: | :-: |
| Android | iOS |
---
#### [`05-datetimepicker.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-05-datetimepicker-json)
![](https://i.imgur.com/PShy8He.png =x500)
---
## [`06-quickreply.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-06-quickreply-json)
![](https://i.imgur.com/ubzZmYN.png =x500)
---
## 功能 3
用電腦從 [Flex Message Simulator](https://developers.line.biz/flex-simulator/)
直接貼上複製下來的 JSON
###### (如果 JSON 過長可以先 minify)
---
#### [`07-flex.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-07-flex-json)
| ![](https://i.imgur.com/qggoRYv.jpg =x500) | ![](https://i.imgur.com/1YK41xj.png =x500) |
| :-----: | :-: |
| Android | iOS |
---
# 其他功能
---
# [支援 mention](https://taichunmin.idv.tw/blog/2021-01-20-line-devbot-mention.html)
`/getProfile @其他人`
---
# [快速測試 Stickers](https://taichunmin.idv.tw/blog/2021-04-16-linebot-test-sticker.html)
`/replySticker 11538 51626507`
`/notifySticker 11538 51626507`
---
## [richmenuswitch](https://taichunmin.idv.tw/blog/2021-06-22-linebot-richmenu-alias.html)
###
`/demoRichmenuAlias`
## (限 1 對 1 聊天)
---
# QA
<style>code {
font-size: 87.5%;
color: #e83e8c;
word-wrap: break-word;
background-color: white;
border-radius: .35rem;
}</style>
{"metaMigratedAt":"2023-06-16T04:24:09.509Z","metaMigratedFrom":"YAML","title":"Flex 開發人員工具 richmenuswitch 新功能範例","breaks":true,"image":"https://i.imgur.com/NT0ldxG.png","contributors":"[{\"id\":\"0d9a5e06-1f92-4142-b9df-fed4c8873573\",\"add\":4903,\"del\":1147}]"}