Answer the question
In order to leave comments, you need to log in
How to make a post on the wall in vk.com using wall.post from the site?
All the time I stumble upon the error "open api access error", or the window appears and disappears.
Here is the code that I use using open api:
<button type="button" class="btn btn-primary" onclick="postWall('test message');"></button>
VK.init({
apiId: ********
});
function postWall(message) {
VK.Auth.login(
function(response) {
if (response.session) {
var userId = response.session.mid;
VK.Api.call('wall.post',
{owner_id: userId, message: message}, function (data) {
if (data.response) {
alert('Запись успешно добавлена!');
}
});
}
},
8192
);
Answer the question
In order to leave comments, you need to log in
but everything seems to be fine, I tested from the local machine, and if you work from the server, then the messages are fasting
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question