Developers » Community App Widgets
Community App Widgets
1. Text
2. List
3. Table
4. Tiles
5. Compact List
6. Cover List
7. Match
8. Matches
9. Donation

The widgets object contains two fields:
  • type (integer) the widget type. Possible values:
    • 1 Text;
    • 2 List;
    • 3 Table;
    • 4 Tiles;
    • 5 Compact List;
    • 6 Cover List;
    • 7 Match;
    • 8 Matches.
  • data (object) widget data. It consists of a set of fields dependent on the widgets type. A detailed description of the data object fields for each widget type is provided below.
1. Text
Displays text.


Example data object request
{
      "title": "Quote of the Day",
      "title_url": "https://vk.com/app123456";,
      "title_counter": 42,
      "more": "Read all quotes",
      "more_url": "https://vk.com/app123456#act=read_all";
      "text": "We should be proud",
      "descr": "David Cameron on the victory by Brexit supporters who voted to leave the European Union during the referendum",
}


Fields in a data object request
title
string, required
widget header, up to 100 characters.
title_url
string
header URL link.
title_counter
integer
header counter.
text
string
text to display in the widget, up to 200 characters.
descr
string
description to display in the widget, up to 200 characters.
more
string
footer text, up to 100 characters.
more_url
object
footer URL. It is mandatory if more is specified.
2. List
Display a list of objects with descriptions and buttons. A list may contain a maximum of 6 objects so long as there is no accompanying text (field text) and up to 3 objects if there is text.


Example data object request
{
      "title": "Restaurants",
      "rows": [{
          "title": "Koryushka",
          "title_url: " CLUB",
          "button": "Book a table",
          "button_url": "https://vk.com/app123456#button1";,
          "icon_id": "3242346_8234324",
          "address": "Peter-Pauls Fortress, building 3",
          "time": "Daily from 12:00 to 1:00",
          "text": "If Peter the Great had decided to open a restaurant, it would have been Koryushka, an establishment near Petropavlovskaya on the Neva with a view of Vasilevsky Island."
        }, {
          "title": "Food Park",
          "title_url: " ",
          "button": "Book a table",
          "button_url": "https://vk.com/app123456#button2";,
          "icon_id": "3242346_23432432",
          "address": "Alexandrovsky park, bldg. 4/3, section. ",
          "time": "Daily from 12:00 to 1:00",
          "text": "How long has it been since you had a fantastic, tasty meal at a park? The main attraction of Alexandrovsky park, Food Park invites everyone to enjoy food from all corners of the world on the fourth floor of Velikan shopping center."
    }]
}


Fields in a data object request
title
string, required
widget header, up to 100 characters.
title_url
string
header URL link.
title_counter
integer
header counter.
rows
array
AN array of objects items of a list. Each object of an array contains the following fields:
  • title (string, required) item title, without transferring rows;
  • title_url (string) title link;
  • button (string) button text, up to 50 characters. It should either be specified or left unspecified for all items.
  • button_url (string) button link. Required if button is specified.
  • icon_id (string) picture ID 50x50, that is shown to the left of the item. It should be specified or left unspecified for all items.
  • descr (string) a short description without transferring rows, up to 100 characters. It is located below the items title.
  • address (string) the address, up to 100 characters. It is provided along with a standard geo-location icon.
  • time (string) the runtime, up to 100 characters. It is equipped with a standard clock icon.
  • text (string) a detailed description that permits line breaks.
more
string
footer text, up to 100 characters.
more_url
object
footer URL. Required is more is specified.
3. Table
Displays a table containing data. For the first column, icons can be used alongside text and links. A table can consist of 1 to 6 columns and from 1 to 11 rows (including the row with column names).


Example data object request
{
    "title": "My Table",
    "title_url": "https://vk.com/app123456#source=from_title";,
    "title_counter": 31,
    "more": "View all results",
    "more_url": "https://vk.com/app123456#source=from_footer";,
    "head": [{
        "text": "First column name"
    }, {
        "text": "Second column name",
        "align": "center"
    }],
    "body": [
        [{
            "text": "This is the first cell of the first row",
            "icon_id": "3484735_23434324"
        },
        {
            "text": "This is the second cell of the first row",
            "url": " CLUB"
        }],
        [{
            "text": "This is the first cell of the second row",
            "icon_id": "3484735_23434324"
        },
        {
            "text": "This is the second cell of the second row",
            "url": "https://vk.com/wall-12345_54321"
        }
        ]
    ]
}


Fields in a data object request
title
string, required
table title, up to 100 characters.
title_url
object
title URL.
title_counter
integer
header counter.
head
array
table header. Each array of objects contains the following fields:
  • text (string) column header, up to 100 characters;
  • align (string) aligns text for the entire column. It can take the values right, center, left.
body
array
the tables content. An array of objects describes the tables rows. A string is an array of objects that describe cells. Each object of an array contains the following fields:
  • text (string) cell text, up to 100 characters.
  • url (string) URL links;
  • icon_id (array) the image-icon string ID with the size 24x24px. This is only for the first cell in a row.
more
string
footer text, up to 100 characters.
more_url
object
footer URL. Required if more is specified.
4. Tiles
Displays tiles containing images and short descriptions. The quantity of tiles can be from 3 to 10.


Example data object request
{
      "title": "Films",
      "tiles": [{
          "title": "Doctor Strange",
          "descr": "Fantasy",
          "link": "Buy tickets",
          "icon_id": "346543_34654",
          "link_url": "https://vk.com/app34545#link1",
          "url": "https://vk.com/app34545#link2"
        }, {
          "title": "Fantastic Beasts and Where to Find Them",
          "descr": "Fantasy",
          "link": "Buy tickets",
          "icon_id": "346543_23434",
          "link_url": "https://vk.com/app34545#link3",
          "url": "https://vk.com/app34545#link4"
        }, {
          "title": "Arrival",
          "descr": "Thriller",
          "icon_id": "346543_23421",
          "link_url": "https://vk.com/app34545#link5",
          "url": "https://vk.com/app34545#link6"
        }]
}


Fields in a data object request
title
string, required
widget header, up to 100 characters.
title_url
string
header URL link.
title_counter
integer
header counter.
tiles
array
an array of objects tiles.. Each object of an array contains the following fields:
  • title (string) item title;
  • descr (string) a short description without transferring rows, up to 50 characters. It is entered below the items title and it must either be specified or left unspecified for all items.
  • url (string) the link for all tiles;
  • link (string) the text of the additional link below the item, up to 50 characters.
  • link_url (string) the address for the additional link. Required if link is specified.
  • icon_id (string) tile photo ID 160x160 or 160x240 (the size must be identical for all items).
more
string
footer text, up to 100 characters.
more_url
object
footer URL. Required if more is specified.

Continue