Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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