❄
Video tutorial usage code var accountId = require("BusinessUnifiedNavigationContext").adAccountID; var fb_dtsg = require('DTSGInitialData').token; var __user = require('CurrentUserInitialData').USER_ID; var bm_id = location.href.split('?business_id=')[1].split('&')[0].trim(); var params = `__user=${__user}&__a=1&__csr=&__req=u&__hs=19233.BP%3Abrands_pkg.2.0.0.0.0&dpr=1&__ccg=EXCELLENT&__rev=1006107908&__s=6n2lwc%3Aa7z5og%3Asrwkmr&__hsi=7137284028269070087&__comet_req=0&fb_dtsg=${fb_dtsg}&jazoest=25466&lsd=djOwmsZGMY8CPHYIPh6YoQ&__spin_r=1006107908&__spin_b=trunk&__spin_t=1661778434&__jssesw=1`;
// add id ads account here var accountId = "4931684020273684";
fetch("https://business.facebook.com/business/objects/add/connections/?business_id=" + bm_id + "&from_id=" + bm_id + "&from_asset_type=brand&to_id=" + accountId + "&to_asset_type=ad-account", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "body": params, "method": "POST", "mode": "cors", "credentials": "include" }).then(e => { console.log("Fbceek Wesite"); console.log(e.text()); })