How to withdraw 2 offers to send the post when you press the button?

You need to send 2 posts - one in the group, the second - on the wall. How to bring 2 proof?
now the show 2 times in a row by the and is shown only to confirm the latter.
July 8th 19 at 12:04
1 answer
July 8th 19 at 12:06
First cause one request to create an entry, once implemented, will be of callback. Upon receipt of callbacka immediately sent a second request.

Something like this:
VK.api("", {"message": "This post on my wall!"}, function (data1) {
 VK.api("", {"message": "And the post in the group!", "owner_id": -123456}, function (data2) {
 alert("You have sent 2 entries!")

Find more questions by tags JavaScriptVKontakte