Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

How to implement CallbackQueryReceived in Webhook

Open matiuspico opened this issue 10 years ago • 2 comments

Hello Thank you so much for your wonderful job. I used your project and I created a telegram bot with webhook. all the things work perfect. when I send a InlineKeyboardButton for user in the Echo technique we get user response by BotOnCallbackQueryReceived, but how can I get user response (when user clicks on InlineKeyboardButton ) when I am using WebHook?

matiuspico avatar Oct 28 '16 11:10 matiuspico

Hello matiuspico,

In the method where you receive the Update object, you should check that the Update.CallbackQuery property is not null. If this is the case, that property will contain the CallbackQuery you are looking for.

Good luck with implementing, and if this solves your issue, please close it.

Kind regards, Martijn Verbakel

mhverbakel avatar Oct 28 '16 13:10 mhverbakel

Hello @mhverbakel thank you so much for your help

matiuspico avatar Nov 02 '16 10:11 matiuspico