By Admin on Tuesday, 22 December 2020
Category: All

Telegram Send Message with Buttons

From sgcWebSockets 4.4.6, the telegram client has been improved to support send messages with buttons (only supported when you login as a bot)​.

The methods to send a message have been modified to add a new parameter where you can send the Callback and URL Buttons.

Before you send a message create an instance of the class TsgcTelegramReplyMarkupInlineKeyboard and call the method AddButtonTypeCallback or AddButtonTypeUrl for every button you want to create.

Button Callback 

Create a new message asking the user if likes or not the message. Process the response using OnNewCallbackQuery event. 

Button Url 

Create a new message like Button Callback and now add a button which will open a new page to answer a poll.

Related Posts