Now I have code like this api call, the social network vk.com:
// Setup
var fs = require('fs');
var VK = require('vksdk');
var vk = new VK({
'appId': ********,
'appSecret': '*****************',
'language': 'ru'
});
vk.oldRequest("photos.get", {
owner_id: "-28445240",
album_id: "wall",
rev: "1",
extended: "1",
version: "5.40",
}, function (data) {
console.log(data);
});
In the console output json. How to write it to a file.