How to add a VK button

The code in the field is divided into two parts, the first part must be inserted inside the head tags:

<!-- Put this script tag to the <head> of your page -->
<script type="text/javascript" src="http://vk.com/js/api/share.js?86" charset="windows-1251"></script>

And the second in that part of the site where the button is needed:

<!-- Put this script tag to the place, where the Share button will be -->
<script type="text/javascript"><!--
document.write(VK.Share.button(false,{type: "round", text: "Save"}));
--></script>

For sites without JavaScript support, you can use a link of this kind:

<a href="http://vkontakte.ru/share.php?url=http://mysite.com" target="_blank">Share VK</a>

Official information and constructor for creating a VK button at http://vk.com/pages.php?act=share

Leave a comment

Leave a Reply