How do you handle a postback from the messenger persistent menu in the MS Bot Framework?
I have not been able to see any channel data.
Please can someone tell me how this event is handled.
How do you handle a postback from the messenger persistent menu in the MS Bot Framework?
I have not been able to see any channel data.
Please can someone tell me how this event is handled.
When you click persistent menu you get something like this :
{
"sender":{
"id":"USER_ID"
},
"recipient":{
"id":"PAGE_ID"
},
"timestamp":1458692752478,
"message":{
"mid":"mid.1457764197618:41d102a3e1ae206a38",
"text":"hello, world!",
"quick_reply": {
"payload": "DEVELOPER_DEFINED_PAYLOAD"
}
}
}
You can get it :
string quick_reply = msg.ChannelData != null ? msg.ChannelData.message?.quick_reply?.payload.ToString() : "";
I'm using this line of code to get quick reply, but it's the same code for getting callback from persistent menu because it's quick reply actually.