How do i capture CallbackQuery using webhook?

10 ответов

28 просмотров

Read documentation of the library you are using.

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Read documentation of the library you are using.

am not .. i using generic javascript working with the api

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Read documentation of the library you are using.

the webhook comes as a post . . . for message i work on it using data.message.text for example

SmeLLyKoaLa
the webhook comes as a post . . . for message i w...

you can get callbackquery with data.callback_query https://core.telegram.org/bots/api#callbackquery

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
you can get callbackquery with data.callback_quer...

yeah i tried that but not seem to be working .. i have a mixed of callback and message coming in .. do u know how i can determine which is which and action accordingly? my JS is not so good. . . ty

SmeLLyKoaLa
yeah i tried that but not seem to be working .. i...

I don’t think message and callbackquery can come at the same time. Read this https://core.telegram.org/bots/api#update You need to check which type of update your bot has. if data.message: means your bot has message if data.callback_query. your bot has callbackquery

Yes. It is data.callback_query read this for possible updates https://core.telegram.org/bots/api#update

SmeLLyKoaLa- Автор вопроса
Horlarwumhe
Yes. It is data.callback_query read this for pos...

messenge is being indentified. . .but callback still no . . it seems like the api is not webhooking me for callback

SmeLLyKoaLa
messenge is being indentified. . .but callback sti...

Are you sure you sent callback_query to your bot ?

SmeLLyKoaLa- Автор вопроса

Похожие вопросы

Карта сайта