D
D
Denis Bukreev2018-10-29 09:35:11
API
Denis Bukreev, 2018-10-29 09:35:11

How to make a VK post from the application?

There is a VK application in which the user is given the opportunity to make a post on the wall.
I initialize vk.api: Next, I hang an event on the button, in which the following code:VK.init({apiId: '*******'})

console.log('share');

VK.api("wall.post", {
  "message": shareText,
  "attachments": attachment,
  "v":"5.87 "
});

And from this code only output to the console is performed, there is no reaction at all to the call to VK.api, there is not even an error in the console.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Bukreev, 2018-10-29
@denisbookreev

I connected this file to the header: https://vk.com/js/api/xd_connection.js?2and it all worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question