Entwickler » Publications
1. Publishing from websites
1.1. Share
To publish a link on your website, use the widget Share or its simplified version —this type of link https://vk.com/share.php?url=

To learn more about using this widget, visit this page.

1.2. Other widgets
Sharing with friends is possible in several widgets for external websites. If each of these cases, a link to your website where the widget is placed will be attached to the post on the user’s wall:
  • Widget comments — a user can share comments on their wall. The parameter autoPublish allows the user to set publishing by default.
  • Widget «Like» — the action «Tell friends» creates a post with optional commentary on the user’s page.
  • Polls widget — the user can share poll results.
2. Publishing from apps
For publishing posts from clients and server apps, use the method wall.post. You can call it directly by using the classic interaction with API scheme, from SDK, from Open API, if the speech is about the app-website. In Open API and apps on vk.com, actions require user confirmation.
Dialogue for publishing posts using Android SDK

2.1. Media content in wall posts
To attach audio, video or photos to a post, pass the type of object and its string identifier in the parameter attachments.

Object type — audio, video, photo or doc.
String identifier — this is a string which includes the object’s owner ID (owner_id) and the ID of the object itself (audio_id, video_id etc.).

For example, for pictures photo34_408897832 in attachments it is necessary to pass the value photo34_408897832.

https://api.vk.com/method/wall.post
?owner_id=-1
&message="Tanya"
&attachments="photo34_408897832"
&access_token={YOUR_ACCESS_TOKEN}
&v=5.57
Call the method wall.post to publish the post with the text “Tanya” and the attached photo photo34_408897832 on the community wall ÂÊîíòàêòå API.

To attach a new object to the wall post, it is necessary to upload it to the VK server. Depending on the type of content, use one of the approaches, which is described on this page. Then use the uploaded object’s ID in the parameter attachments.
2.2. Suggested and postponed posts
With the help of wall.post, it is possible to work with suggested and postponed posts. In order to create a suggested post, pass the published page ID into “owner_id”, where the current user is not the manager.

To create a postponed post, pass the time of publication into the parameter publish_date.

For publishing suggested and postponed posts, use the parameter post_id, the value of which can be received using the method wall.get with filter=suggests and postponed accordingly.
2.3. Links to external websites
To attach a link snippet from an external website to a post (image preview, title and description), pass the URL in the parameter attachments. For example, http://yandex.ru. The snippet is generated automatically. To learn more about this, continue reading the next section.
3. Formatting of external links
3.1. Snippets Data
Link snippets to an external website in a wall post

A snippet for external sites in wall posts, comments or personal messages is generated automatically. Information for this is determined according to these rules:
  • Title. If the published page contains the tags og:title, mrc__share_title or twitter:title, then the title will be taken from one of these (whichever is stated first), otherwise the tag <title> will be used.
  • Illustrations. If the published page contains the tag vk:image, then the address for the illustration will be taken from it. If no, the tags og:image, twitter:image, image will be checked and the address for the illustration will be taken from whichever is stated first. Otherwise the address will be formed by the first eight tags <img src="...">, and these suggestions are offered for images with a height and width in excess of 160 pixels. If the picture is more than 537 pixels in width, then the link on the website will be followed by an enlarged picture.

An example of a website code which mentions the data for the title, description and image used for VK publications:
<head>
<meta property="og:title" content="Title page" />
<meta property="og:image" content="https://pp.vk.me/c629531/v629531034/3172e/xEBYyER1WE4.." />
<meta property="og:description" content="Page description" />
</head>


Take note that data for publishing may be cached. If you changed the data on your website, while old data is being displayed on VK, clear the website cache pages.clearCache.
3.2. Previewing articles
For informational resources, we recommend sharing published materials in the section «Articles».

If the link to the article is included in the post, the button “preview” will appear, which redirects to a wiki-version of the article. A user can preview the article’s content without going to an external website.
Preview button under the post


To switch on the preview function for links from your website, please contact Support. In the application, it is necessary to mention links to several examples of the articles, the link to the VK community of your website and data regarding website and community visits.

Open a wiki-version of an article

By continuing to browse, you consent to our use of cookies. You can read our Cookie Policy here.