Method SendGenericTemplateMessageAsync - HiznyakNikita/facebook-messenger-net-lib GitHub Wiki
SendGenericTemplateMessageAsync
sends a message with generic template message to user
Parameters
- long userId - user ID , user id for whom message is sent
- List elements - list of GenericTemplateElement type objects which will be send to user in message
Result
A message with generic template sent to the user
Example
public async Task SendMessage(long userId, Message message) { if (message.Attachment.Payload.GetType() == typeof(GenericTemplate)) await _api.SendGenericTemplateMessageAsync(userId, (message.Attachment.Payload as GenericTemplate).Elements.ToList()); }