+
Skip to content

gmcnicol/fbuf

Repository files navigation

Facebook Blocker

Automated Playwright + TypeScript script that logs into Facebook, lets you solve any checkpoint/captcha manually, and then walks your News Feed looking for posts whose author still shows a “Follow” button. Those authors/pages are automatically blocked so their content never shows up again.

⚠️ Disclaimer Automating Facebook almost certainly violates its Terms of Service. Run this tool at your own risk – preferably on a throw‑away or test account.


Features

  • Credential login via environment variables (.env) – email + password only.
  • Manual checkpoint pause – the script waits until you press ENTER after solving any captcha/2‑FA.
  • Block loop
    • Scans the visible feed for Follow buttons.
    • Opens the post’s action menu and chooses **Block ** (with confirm dialog handling when shown).
    • Scrolls & repeats until it either:
      • reaches MAX_BLOCKS, or
      • performs 10 consecutive scans without finding someone new to block.
  • Self‑healing timeouts – if an element/action times out the page is reloaded and the scan resumes.
  • Full‑screen UI – Chromium launches maximized (--start-maximized, viewport: null) so the script can see as much of the feed as possible.
  • Verbose logging so you can watch progress in the terminal.

Quick‑start

npm install
npm start

Environment variables

Variable Description
FACEBOOK_EMAIL Facebook login email (required)
FACEBOOK_PASSWORD Facebook login password (required)
MAX_BLOCKS Stop after this many successful blocks (default 5)

Feel free to hard‑code additional tweaks at the top of facebook_blocker.ts (timeouts, scan limits, etc.).


Project layout

.
├── .env               # your private credentials (never commit this!)
├── facebook_blocker.ts
├── package.json
└── tsconfig.json

Development

  • Lint / format however you like (ESLint, Prettier, etc.).
  • Pull requests welcome. Please follow conventional‑commit messages and keep commits focused.
  • Bug reports: open an issue with the full terminal log and, if possible, a screenshot / description of what was on‑screen when it failed.

Roadmap

  •  Optional headless mode
  •  Configurable scan depth (how far to scroll each iteration)
  •  Docker container for one‑command execution
  •  GitHub Action that runs on a schedule (again: risk‑y)

License

MIT © 2024 — Use at your own risk.

About

Don't use this.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载