Skip to content

Instantly share code, notes, and snippets.

@akkez
Last active January 2, 2016 07:08
Show Gist options
  • Save akkez/8267641 to your computer and use it in GitHub Desktop.
Save akkez/8267641 to your computer and use it in GitHub Desktop.
Script which helps to transfer all photos from one album to another in VK.
var user_id = 0;
var from_album = 0;
var to_album = 0;
var photos = API.photos.get({album_id: from_album}).items@.id;
var i = 0;
var result = [];
while (i < photos.length) {
result = result + API.photos.move({
owner_id: user_id,
target_album_id: to_album,
photo_id: photos[i]
});
i = i + 1;
}
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment