A
A
alex-bul2019-05-09 21:38:12
Python
alex-bul, 2019-05-09 21:38:12

How to work with appWidgets.update method in python?

Hello! I am writing a chat bot in python and I can’t deal with the above vk api method. I did not find documentation about this method or examples of application in python, so I decided to ask you. Here is my code:

vk3 = vk_api.VkApi(token="токен")
vk3.get_api()
vk3.method("appWidgets.update", {"type" : "table", "code":{
"title": "Лучшие подписчики!",
"title_url": "ссылка на мою группу",
"head": [
{
"text": "Имя"
},
{
"text": "Коллиество",
"align": "right"
}
],
"body": [
[
{
"icon_id": "id242306128",
"text": "Александр Бульбенков",
"url": "vk.com/id242306128"
},
{
"text": "Содержимое 1x2"
}
],
[
{
"icon_id": "id242306128",
"text": "Александр Бульбенков",
"url": "vk.com/id242306128"
},
{
"text": "Содержимое 1x2"
}
],
[
{
"icon_id": "id242306128",
"text": "Александр Бульбенков",
"url": "vk.com/id242306128"
},
{
"text": "Содержимое 1x2"
}
]
],
"more": "Подробнее",
"more_url": "https://vk.com/write-АЙДИ_ГРУППЫ"
}})

Error vk_api.exceptions.ApiError: [12] Unable to compile code: undefined identifier 'more_url' in line 1
What should I do? I would be very grateful if you send examples of this method in python or teach how to use it. I studied the documentation of this method in VK in detail, but, as you understand, it did not help me.
Ps in the code specially replaced some points

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rogiivs, 2019-05-09
@rogiivs

read the error
show the full code, you can replace the private ones with any rubbish

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question