{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1457764197627, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1457764197618:41d102a3e1ae206a38", ... } }
{ "object": "page", "entry": [ { "id": "<PAGE_ID>", "time": 1570053170926, "standby": [ { "sender": { "id": "<PAGE_ID>" }, "recipient": { "id": "<PSID>" }, "timestamp": 1570053170673, "message": { "mid": "qT7ywaKpO9kkQR7Gv-nM8LIfLZDamVrALniheUYEDdHJXjDXEAyaS1xxONzb2Iv-DFzmTihfWJV012P5pK0AhQ", "is_echo": true, "app_id": <APPID>, "attachments": [ { "title": "", "url": "https:\/\/www.facebook.com\/commerce\/update\/", "type": "template", "payload": { "template_type": "media", "elements": [ { "media_type": "image", "attachment_id": 2457235337685388 } ] } } ] } } ] } ] }
sender
sender 欄位 | 說明 |
---|---|
| Facebook 粉絲專頁的編號 |
recipient
recipient 欄位 | 說明 |
---|---|
| 收到商家訊息的用戶粉絲專頁範圍編號 |
message
欄位名稱 | 類型 | 說明 |
---|---|---|
| 布林值 | 表示從粉絲專頁傳送的訊息 |
| 字串 | 傳送訊息的應用程式編號。從圖形 API |
| 字串 | 傳遞至傳送 API 做為 |
| 字串 | 訊息編號 |
{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1457764197627, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1457764197618:41d102a3e1ae206a38", "text":"hello, world!" } }
message
屬性 | 類型 | 說明 |
---|---|---|
| 字串 | 訊息文字 |
{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1458696618268, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1458696618141:b4ef9d19ec21086067", "attachments":[ { "type":"image", "payload":{ "url":"<IMAGE_URL>" } } ] } }
message.attachments
屬性 | 類型 | 說明 |
---|---|---|
| 字串 | 附件類型: |
| 字串 | 附件網址 |
{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1458696618268, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1458696618141:b4ef9d19ec21086067", "attachments":[ { "type":"template", "payload":{ "template_type":"button", "buttons":[ { "type":"web_url", "url":"https:\/\/www.messenger.com\/", "title":"Visit Messenger" } ] } } ] } }
message.attachments
屬性 | 類型 | 說明 |
---|---|---|
| 字串 |
|
| 字串 | 傳送 API 參考資料中所述的範本承載 |
遞補附件是 Message Echo(訊息回應)功能目前無法識別或支援的附件。
{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1458696618268, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1458696618141:b4ef9d19ec21086067", "attachments":[ { "title":"Legacy Attachment", "url":"https:\/\/www.messenger.com\/", "type":"fallback", "payload":null } ] } }
message.attachments
屬性 | 類型 | 說明 |
---|---|---|
| 字串 |
|
| 字串 | 附件標題(選用) |
| 字串 | 附件網址(選用) |
| 字串 | 附件承載(選用) |
含產品回應 Webhook 的訊息只適用於圖形 API v8.0 以上版本
應用程式將需要具有核准的 catalog_management
權限,才能在 Webhook 中接收產品詳細資料。
{ "sender":{ "id":"<PAGE_ID>" }, "recipient":{ "id":"<PSID>" }, "timestamp":1458696618268, "message":{ "is_echo":true, "app_id":1517776481860111, "metadata": "<DEVELOPER_DEFINED_METADATA_STRING>", "mid":"mid.1458696618141:b4ef9d19ec21086067", "attachments":[ { "type":"template", "payload":{ "product":{ "elements":[ // multiple elements for Hscroll { "id":"<PRODUCT_ID>", "retailer_id":"<EXTERNAL_ID>", "image_url":"https://fb.cdn.com/sdsd", "title":"Some product title", "subtitle": "40", }, {...}, ] } ] } } ] } }
product.elements
屬性 | 類型 | 說明 |
---|---|---|
| 字串 | 商品目錄中的產品編號 |
| 字串 | 與產品相關聯的外部編號。(例如:SKU/內容編號) |
| 字串 | 產品圖像網址 |
| 字串 | 產品標題 |
| 字串 | 產品副標題 |