Как узнать прошел ли фп запрет рекламной деятельности?

Как узнать прошел ли фп запрет рекламной деятельности?

Подпишись на наш telegram-канал и получай свежие кейсы и информацию первым!

1. Переходим в https://www.facebook.com/pages/?category=your_pages

2. Вставляем код:

await checkFunPage().catch(e => console.log("Error", e));

async function checkFunPage() {
 let userId = getUserId();
 let variables = {
  "assetOwnerId": userId
 };

 let body = [
  {key: "av", value: userId},
  {key: "session_id", value: "6188737e18625ed8"},
  {key: "__user", value: userId},
  {key: "__a", value: "1"},
  {key: "__dyn", value: ""},
  {key: "__csr", value: ""},
  {key: "__req", value: "h"},
  {key: "__hs", value: "19177.BP:DEFAULT.2.0.0.0.0"},
  {key: "dpr", value: "2"},
  {key: "__ccg", value: "EXCELLENT"},
  {key: "__rev", value: "1005786244"},
  {key: "__s", value: ""},
  {key: "__hsi", value: ""},
  {key: "__comet_req", value: "0"},
  {key: "fb_dtsg", value: getToken()},
  {key: "jazoest", value: "25401"},
  {key: "lsd", value: ""},
  {key: "__spin_r", value: "1005786244"},
  {key: "__spin_b", value: "trunk"},
  {key: "__spin_t", value: ""},
  {key: "fb_api_caller_class", value: "RelayModern"},
  {key: "fb_api_req_friendly_name", value: "AccountQualityUserPagesWrapper_UserPageQuery"},
  {key: "variables", value: JSON.stringify(variables)},
  {key: "server_timestamps", value: "true"},
  {key: "doc_id", value: "5196344227155252"}
 ];
 return fetch("https://www.facebook.com/api/graphql/", {
  headers: {
   "content-type": "application/x-www-form-urlencoded"
  },
  body: body.map(pair => pair.key + "=" + pair.value).join("&"),
  method: "POST",
  mode: "cors",
  credentials: "include"
 })
  .then(async response => {
   if (200 === response.status) {
    let data = await response.text();
    data = JSON.parse(data);
    if ('data' in data && 'userData' in data.data && 'pages_can_administer' in data.data.userData) {
     pzrd_count = []
     for (let i = 0; i < data.data.userData.pages_can_administer.length; i++) {
      var current_page = data.data.userData.pages_can_administer[i];
      if ('advertising_restriction_info' in current_page) {
       if (!current_page.advertising_restriction_info.is_restricted && current_page.advertising_restriction_info.restriction_type == "ALE") {
        pzrd_count.push(`Pro Ads - Reinstated Page: ${current_page.name} | ${current_page.id}`);
       }
      }
     }
     console.log(`${pzrd_count.join('\r\n')}\nTotal: ${pzrd_count.length}`);
     return true;
    }
   }
   console.log("Cannot find any reinstated pages");
   return false;
  })
  .catch(e => console.log("Error", e));
}

function getUserId() {
 return require("CurrentUserInitialData").USER_ID || [removed].match(/c_user=(\d+)/)[1];
}

function getToken() {
 return require("DTSGInitialData").token || document.querySelector('[name="fb_dtsg"]').value;
}

Источник