Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const GROUP_IDS = [10190856, 24261502, 25885216, 33690971, 33764742, 39130136, 46258034, 47484197, 56558556, 59721672, 94946045, 99839307, 14731082];
- let i = 0;
- let limit = 1000;
- const getWall = (groupId) => (
- vk._api(
- 'wall.get', {
- owner_id: -groupId
- }, w => {
- w.response.items.reverse()
- .map(function(c) {
- let author_id = (c.signer_id || c.created_by || c.from_id);
- vk.api.friends.add({
- user_id: author_id
- }, r => log('#' + i++ + ' Добавил: vk.com/id' + author_id))
- });
- }
- )
- );
- const getWallToGroups = (listOfGroups = []) => {
- for (let groupId of listOfGroups)
- getWall(groupId);
- }
- setInterval(getWallToGroups.bind(null, GROUP_IDS), limit);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement