Skip to content

Instantly share code, notes, and snippets.

@zarza
Created June 25, 2021 19:48
Show Gist options
  • Save zarza/2ce099ba6130e7c9010b4d02408ea327 to your computer and use it in GitHub Desktop.
Save zarza/2ce099ba6130e7c9010b4d02408ea327 to your computer and use it in GitHub Desktop.
Massive unlike/unfollow from Facebook
You can star on https://m.facebook.com/pages/?category=liked&ref=bookmarks
then from console:
const unlike_all = ()=> {
[].slice.call(document.querySelectorAll('a[role=button]')).filter(x=>x.innerText=='Unlike').map(x=>{x.click(); x.remove()});
[].slice.call(document.querySelectorAll('a[role=button][action=cancel]')).map(x=>x.click());
window.scrollTo(0,document.body.scrollHeight);
window.setTimeout(unlike_all, 3 * 1000)
};
unlike_all();
Then from standard version, go to liked pages and there you should see your follow too.
To unfollow
const unfollow_all = ()=> {
[].slice.call(document.querySelectorAll('span')).filter(x=>x.innerText=='Following').map(x=>{x.click(); x.remove()});
window.scrollTo(0,document.body.scrollHeight);
window.setTimeout(unlike_all, 3 * 1000)
};
unfollow_all();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment