E
E
Eugene2016-06-23 16:46:15
PHP
Eugene, 2016-06-23 16:46:15

How to make buttons in a bot?

How to make buttons instead of a keyboard?
69512d9f69fc4ec98c93ff18b6049ea3.jpg
As I understand it, the API has been updated and now inline buttons are as follows:
4AkvzG6IMaewY2.jpg
Code for creating an array of buttons:

$inline_keyboard = array('inline_keyboard' => 
        array(
          array(
            array(
              'text' => 'Русский', 'callback_data' => '/set_language ru'
              ),
            array(
              'text' => 'English', 'callback_data' => '/set_language en'
              ), 
            array(
              'text' => $button_cancel, 'callback_data' => '/cancel'
              ), 
            ),
        ),
      );

And if now there are no other ways, how then can you specify that each button be on a new line when issued? And after 1 click, these buttons disappeared?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question