Home Facebook Structured Message (Template) in conversation api
Reply: 0

Facebook Structured Message (Template) in conversation api

Nguyễn Huy
1#
Nguyễn Huy Published in 2018-01-10 05:15:43Z

I'm working on linking a Messenger Bot with a Inbox Manager App.
Inbox Manager App need to get old messages from /conversation API https://developers.facebook.com/docs/graph-api/reference/v2.11/conversation/messages to display old messages. However, I can't find proper data to display it.
Example:
1.Button Template

data in conversation:

{
 "message": "Đây là những chức năng chính của chúng tôi",  
 "shares": {
   "data": [
     {
       "id": "2020954901252437"
     }
   ]
 }
}

2.Generic Template with 1 Element
data in conversation:

{
 "message": "",
 "shares": {
   "data": [
     {
       "link": "https://www.google.com/maps/dir/api=1&destination=266+%C4%90%E1%BB%99i+C%E1%BA%A5n%2C+H%C3%A0+N%E1%BB%99i",
       "id": "2020947591253168",
       "name": "266 Đội Cấn, Hà Nội - 0904304070"
     }
   ]
 }
}  

Generic Template with 3 Elements
data in conversation:

{
 "message": "",
 "shares": {
   "data": [
     {
       "id": "2014708728543721",
       "name": "Sản phẩm nổi bật 123, Sản phẩm mới, Khuyến mãi"
     }
   ]
 }
}

Is there anyway I can get the full correct template data of a message like this https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic#example_request
I suspect that id in shares.data is attachment_id in https://developers.facebook.com/docs/messenger-platform/send-messages/saving-assets/#asset_types, but I can't find a way to access attachment data anywhere.
Appreciate any help

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324788 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO