Skip to content

Instantly share code, notes, and snippets.

@dvygolov
dvygolov / exportblockedusersfp.js
Last active July 21, 2025 08:20
Export Blocked Users from your FanPage: first switch your profile to your FanPage, then run the script on https://www.facebook.com/settings?tab=blocking
async function privateApiRequest2(body = null, headers = null, url = null) {
let graphUrl = "";
if (url != null) graphUrl = url;
else {
let subDomain = getSubDomain();
graphUrl = `https://${subDomain}.facebook.com/api/graphql/`;
}
if (body == null) {
let uid = require("CurrentUserInitialData").USER_ID;
@dvygolov
dvygolov / createautorules.js
Last active March 30, 2025 19:37
This script adds 4 (+2) Facebook Autorules, read comment below
let api = 'https://graph.facebook.com/v14.0';
let headers = {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\"Google Chrome\";v=\"107\", \"Chromium\";v=\"107\", \"Not=A?Brand\";v=\"24\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
@dvygolov
dvygolov / importblockedusers.js
Last active July 21, 2025 08:20
Import users to the Blocked list of a Facebooks Fan Page
let api = 'https://graph.facebook.com/v14.0';
let headers = {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9",
"cache-control": "max-age=0",
"sec-ch-ua": "\"Google Chrome\";v=\"107\", \"Chromium\";v=\"107\", \"Not=A?Brand\";v=\"24\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",