struggling with inline keyboards (=buttons)
First of all, I'm working with PHP
I made the inline keyboards, users can call it whenever they want but I don't know how to handle callback queries properly.
Online i found some stuff but it didn't help so much.
Can anyone tell me how I can take the information that a button is pressed (and which one)?
you need to put callback_data inside your buttons
so that's how you know which button was pressed, by reading the callback_data
But I have to take another id because the user isn't sending a message, am I right?
Of the user but with the callbackquery[from] (?)
you can read who pressed and what was pressed from callbackquery, yeah, there will be userid and inside callback_data you will see what was pressed
Exactly, but my struggle is here: I still don't understand what callbackquery exactly is and how his fields work
Обсуждают сегодня