T
T
TarakaN272017-05-09 16:58:15
API
TarakaN27, 2017-05-09 16:58:15

How to attach a picture to a post on the VK API wall?

The second day I'm breaking down how to attach a picture to a post from an external site for VK. I don't know much about JS, does anyone know how to do this?
There is a code

<script type="text/javascript" src="//vk.com/js/api/openapi.js"></script>
 
<script type="text/javascript">
VK.init({apiId: ******});
</script>
 
<script type="text/javascript">
function vkpost(url) {
VK.Auth.login(
null,
VK.access.FRIENDS | VK.access.WALL
);
VK.api('wall.post', { message: url }, function (data) { });
}
</script>
 
<a href="#" onclick="vkpost('тут текст поста');">разместить</a>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question