Answer the question
In order to leave comments, you need to log in
How to add your own description and picture to the Vkontakte "Share" button?
I do everything according to the VK documentation, add to the head
<script type="text/javascript" src="http://vk.com/js/api/share.js?90" charset="windows-1251"></script>
<script type="text/javascript">
document.write(VK.Share.button({
url: 'http://www.сайт.ru/',
title: 'Хороший сайт',
description: 'Это мой собственный сайт, я его очень долго делал',
image: 'url изображения',
noparse: true
}));
</script>
Answer the question
In order to leave comments, you need to log in
I solved the issue by writing all the parameters in the url.
<script type="text/javascript">
document.write(VK.Share.button({url: 'http://Сайт/?title=&description=&image=&noparse=true'}));
</script>
This is how it worked for me..
<script type="text/javascript" src="http://vkontakte.ru/js/api/share.js?10" charset="windows-1251"></script>
<script type="text/javascript">/* <![CDATA[ */document.getElementById("vk").innerHTML = VK.Share.button(false,{type: "round", text: "Сохранить",title: "Скачать файл <?=$this->name?>", image: "<?=$vkimg?>", noparse: true});
/* ]]> */</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question