Answer the question
In order to leave comments, you need to log in
How to make the buttons for the VK API bot be in a row, and not one after another?
What parameter to set so that the buttons are in a row as in the screenshot?
And here nothing is really written
ps I’ve been sitting for half an hour uploading an example code with the VK API, I still don’t understand anything
Here is the official example itself
{
"one_time": false,
"buttons": [
[{
"action": {
"type": "location",
"payload": "{\"button\": \"1\"}"
}
}],
[{
"action": {
"type": "open_app",
"app_id": 6979558,
"owner_id": -181108510,
"hash": "sendKeyboard",
"label": "Отправить клавиатуру"
}
}],
[{
"action": {
"type": "vkpay",
"hash": "action=transfer-to-group&group_id=181108510&aid=10"
}
}],
[{
"action": {
"type": "text",
"payload": "{\"button\": \"1\"}",
"label": "Negative"
},
"color": "negative"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"2\"}",
"label": "Positive"
},
"color": "positive"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"2\"}",
"label": "Primary"
},
"color": "primary"
},
{
"action": {
"type": "text",
"payload": "{\"button\": \"2\"}",
"label": "Secondary"
},
"color": "secondary"
}
]
]
}
Answer the question
In order to leave comments, you need to log in
buttons is an array of arrays with buttons, where each new array describes a new row.
Square brackets - array
Curly brackets - object
The first three arrays contain one object each. The fourth array contains several objects (4).
https://vk.com/dev/bots_docs_3?f=4.1.+%D0%9F%D0%BE...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question