Skip to content

Instantly share code, notes, and snippets.

@renestalder
Last active August 10, 2025 12:00
Show Gist options
  • Save renestalder/c5b77635bfbec8f94d28 to your computer and use it in GitHub Desktop.
Save renestalder/c5b77635bfbec8f94d28 to your computer and use it in GitHub Desktop.
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

var unfollowButtons = document.querySelectorAll('[data-followed="1"]'); for(var i=0;i<unfollowButtons.length;i++){ unfollowButtons[i].click(); } alert(unfollowButtons.length+' people are now unfollowed! ');
@ReighEX
Copy link

ReighEX commented Jul 4, 2025

update : now its bugged. Error appear like this
⚠️ No visible 'Unfollow' button found after 3-dot click. VM1033
🎯 No more new 3-dot buttons found, process completed. VM1033:51
✅ Unfollow process completed. Total unfollows: 0 VM1033:84

*i didn't change code or anything

Here is the lates working code: https://github.com/akash-ooo/facebook-auto-unfollow-friends-and-pages-script-2025.git

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