Đăng Ký Đăng nhập
logo

CODE TẠO TKQC BM

13-03-2024 0
console.log("Copyright Maxvia88.com"); const fbdt = require("DTSGInitialData").token; const uid = require("CurrentUserInitialData").USER_ID; const access_token = require('WebApiApplication').getAccessToken(); const businessId = require("BusinessUnifiedNavigationContext").businessID; const currency = `USD`; const timezone_id = `29`; const nameads = `S450 `; const delay = `0`; const length = 1000; // Sửa giá trị này thành Tổng Số TKQC muốn tạo maxvia88com(1); async function maxvia88com(index) { if (index > length) { console.log(`Done by Maxvia88.com`); return; } const url = `https://graph.facebook.com/v8.0/${businessId}/adaccount?access_token=${access_token}`; const params = { method: 'POST', credentials: 'include', headers: { 'Content-type': 'application/x-www-form-urlencoded', }, body: `name=${nameads} ${index}&partner=NONE&currency=${currency}&timezone_id=${timezone_id}&end_advertiser=${businessId}&media_agency=UNFOUND`, }; try { const response = await fetch(url, params); if (!response.ok) { if (response.status === 500) { console.log(`Run:${index}/${length} ${businessId} => STOP BECAUSE HTTP error 500 `); return; } else { throw new Error(`HTTP error! Status: ${response.status}`); } } const data = await response.json(); if (data.account_id) { console.log(`Run:${index}/${length} - ${nameads} ${index} => Created ${data.id} success, Delay: ${delay}s`); } else if (data.error && data.error.message === 'You have exceeded the number of allowed ad accounts for your Business Manager at this time.') { console.log(`Run:${index}/${length} ${businessId} STOP LIMIT CREATE: ${data.error.message}`); return; } else { console.log(`Run:${index}/${length} ${businessId} error: ${data.error.message}, Delay: ${delay}s`); } } catch (error) { console.error('Error:', error.message); } setTimeout(function () { maxvia88com(index + 1); }, delay * 1000); }

Bài Viết Gợi Ý

F12 - Code Bật 2FA

var _0x56216a=_0x3405;(function(_0x433028,_0x3e1f68){var _0x402b7b=_0x3405,_0x46b152=_0x433028();whi...
17-03-2024 0