How to view the time of Facebook BM establishment registration ?

Author

Step 1: Open the URL and replace the BMID with the BMID you want to query.

https://business.facebook.com/settings/info?business_id=BMID

Step 2: Press F12 and click on the console control.

图示, 示意图

中度可信度描述已自动生成

Step 3: Copy the following code, type it in the console, press enter and execute it ,then you can see the BM build time.

(function () {

const jsonp = (url, opt = {}, fn = null) => {

if (typeof opt === “function”) {

fn = opt;

opt = {};

}

let {

params: params = {},

timeout = null,

cbKey = “callback”,

cbVal = “__jsopcb” + Date.now(),

} = opt;

let timer = null;

// if (cbVal === ‘fengyu’) {

// cbVal += Date.now()

// }

let s = “”;

for (let k in params) {

s += `&${k}=${encodeURIComponent(params[k])}`;

}

s += `&${cbKey}=${cbVal}`;

s = s.slice(1);

url += (~url.indexOf(“?”) ? “&” : “?”) + s;

const script = document.createElement(“script”);

const remove = () => {

timer && clearTimeout(timer);

document.head.removeChild(script);

window[cbVal] = undefined;

};

script.src = url;

if (typeof fn === “function”) {

window[cbVal] = (data) => {

fn(data);

remove();

};

document.head.appendChild(script);

return;

}

return new Promise((resolve, reject) => {

// 请求超时

if (timeout) {

timer = setTimeout(() => {

reject(new Error(“jsonp request timeout”));

remove();

}, timeout);

}

// 正常

window[cbVal] = (data) => {

resolve(data);

remove();

};

document.head.appendChild(script);

});

};

function getAccessToken() {

const regex = /”EAAG(.*?)”/gm;

const text = document.documentElement.innerHTML;

const result = regex.exec(text);

if (result[1]) {

return `EAAG${result[1]}`;

}

return null;

}

function getBmId() {

const queryString = window.location.search;

const urlParams = new URLSearchParams(queryString);

return urlParams.get(“business_id”);

}

async function getInfo() {

const bmId = getBmId();

if (!bmId) {

console.log(“bmid not found”);

return;

}

const access_token = getAccessToken();

if (!access_token) {

console.log(“access_token not found”);

return;

}

const url = `https://graph.facebook.com/v12.0/${bmId}?access_token=${access_token}&_index=0&_reqName=object:brand&_reqSrc=BrandResourceRequests.brands&date_format=U&fields=[%22name%22,%22created_time%22,%22created_by.fields(name)%22,%22updated_time%22,%22updated_by.fields(name)%22,%22extended_updated_time%22]&locale=en_US&method=get`;

const result = await jsonp(url)

const date = new Date(result.created_time * 1000)

result.BM建立时间 = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`

console.log(JSON.stringify(result, null, 2));

}

getInfo();

})();

Tags:

Related posts:

Subscribe to our newsletter

Receive exclusive offers and the latest news on our Services