Method SendButtonTemplateMessageAsync - HiznyakNikita/facebook-messenger-net-lib GitHub Wiki
SendButtonTemplateMessageAsync
sends a message with button template structure to user
Parameters
- long userId - user ID , user id for whom message is sent
- string text - text of message
- List buttons - list of MessageButton type objects, represents buttons which will be send to user in message
Result
A message with button template sent to the user
Example
public async Task SendMessage(long userId, Message message) { if (message.Attachment.Payload.GetType() == typeof(ButtonTemplate)) await _api.SendButtonTemplateMessageAsync(userId, message.Text, (message.Attachment.Payload as ButtonTemplate).Buttons.ToList()); }