Answer the question
In order to leave comments, you need to log in
How to get MESSAGE ID of Inlinekeyboard when creating it?
Actually, a question.
1. An INLINE Menu is created: Text and 2 buttons (Next, Back).
2. By clicking on the "Next" or "Back" button, I can catch the MESSAGE_ID
$data = $callback_query['data'];
$message_id = $callback_query['message']['message_id'];
$message = returnPhrasesPage ($type, 1);
$inline_back = array("text"=>"Назад","callback_data"=>'back');
$inline_next = array("text"=>"Далее","callback_data"=>'next');
$inline_keyboard = array(array($inline_back,$inline_next));
$keyboard=array("inline_keyboard"=>$inline_keyboard);
$reply = json_encode($keyboard);
$url = $GLOBALS[website]."/sendmessage?chat_id=".$chatId."&text=".urlencode($message)."&reply_markup=".$reply;
file_get_contents($url);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question