Closed nazargulov closed 8 years ago
It's not allowed for wall.post to do posts from server side.
You can use phantomjs or simple http requests, to authorize and get token.
Then simply add access_token to vk.request params object like:
vk.request('messages.send', {
user_id: id,
message: message,
access_token: token
}, function (_o) {})
Note, that your app must be "Standalone app" in this case
I'm trying to call https://oauth.vk.com/authorize?client_id=4822241&scope=wall,offline&redirect_uri=http://oauth.vk.com/blank.html&display=page&response_type=token And copy the acces_token from url But, if call a) https://api.vk.com/method/wall.post?owner_id=36299915&message=1&access_token=COPYPASTE_TOKEN b)
vk.setToken(accessToken); vk.request('wall.post', { 'owner_id': userId, 'message': '1' }, function(_o) { console.log(_o); });
a get error: 15: Access denied: no access to call this method