Skip to content

Instantly share code, notes, and snippets.

@jcarroll
Last active January 28, 2024 00:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcarroll/1b97f5f81c4668bf3dfdb97b0ac0eb02 to your computer and use it in GitHub Desktop.
Save jcarroll/1b97f5f81c4668bf3dfdb97b0ac0eb02 to your computer and use it in GitHub Desktop.
Unfollow all Facebook Friends, Groups, and Pages
(async () => {
var logs = document.querySelectorAll("*");
for (let i = 0; i < logs.length; i++) {
try {
const logElement = logs[i];
logElement.querySelector(selectors().unlikeBtn).click();
await wait(1500);
i--;
}
catch (error) {
console.log(error);
}
}
})();
function selectors() {
return {
unlikeBtn: `[class="x1b0d499 xi3auck"]`, // need to update each day
};
}
function wait(milliseconds) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(null);
}, milliseconds);
});
}
@mauamolat
Copy link

It's just showing "pending"

@mauamolat
Copy link

image

Please see

@mauamolat
Copy link

image

@iamrishan
Copy link

iamrishan commented Dec 7, 2023

only works on friends/groups/pages that you have followed. nonfriend unfollowings don't work this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment