tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.02k stars 1.43k forks source link

InlineKeyboardButton hit with tdlib AP issue #2877

Closed JrAnTran closed 4 months ago

JrAnTran commented 4 months ago

@aurimasniekis @kossnocorp I need to simulate InlineKeyboardButton hit from my app. Digging around the internet, there is a few of things related such as GetBotCallbackAnswerRequest...

Could you please help clarify this. Many thanks.

JrAnTran commented 4 months ago

in an attempt to openWebApp via hit inlinekeyboadbutton simualtion, I call openWebApp, but its returns "Bot not found". While in the Telegram app, opening the web app is okay with hitting inline button Screenshot from 2024-05-10 18-55-05

While in the Telegram app, opening the web app is okay with hitting inline button

levlam commented 4 months ago

You can't pass hardcoded identifiers to TDLib. You can only pass identifiers received from TDLib as function parameters.

JrAnTran commented 4 months ago

You can't pass hardcoded identifiers to TDLib. You can only pass identifiers received from TDLib as function parameters.

@levlam

chatId, botUserid...received from a message containing replyMarkup of the bot

Tell me is there another way to call OpenWebApp?

JrAnTran commented 4 months ago

@levlam all in all, could you please tell me how to simulate an InlineKeyboardButton hit from a Telegram client app using tdlib..

Many thanks.

levlam commented 4 months ago

It depends on the type of the keyboard button and is described in the description of the corresponding class.

JrAnTran commented 4 months ago

It depends on the type of the keyboard button and is described in the description of the corresponding class.

I have done it already. Thanks