Giter Site home page Giter Site logo

deletefb's Introduction

Why?

I needed a simple and reliable way to delete Facebook posts. There are third-party apps that claim to do this, but they all require handing over your credentials, or are unreliable in other ways. Since this uses Selenium, it is more reliable, as it uses your real web browser, and it is less likely Facebook will block or throttle you.

As for why you would want to do this in the first place. That is up to you. Personally I wanted a way to delete most of my content on Facebook without deleting my account.

Will this really delete posts?

I can make no guarantees that Facebook doesn't store the data somewhere forever in cold storage. However this tool is intended more as a way to clean up your online presence and not have to worry about what you wrote from years ago. Personally, I did this so I would feel less attached to my Facebook profile (and hence feel the need to use it less).

Installation

You have several options to run it.

  1. Install from PyPI with pip3 install --user delete-facebook-posts
  2. Clone this repo and run pip3 install --user . or do pip3 install --user git+https://github.com/weskerfoot/DeleteFB.git
  3. Set up a Python virtualenv, activate it, and run pip3 install -r requirements.txt, then you can just run python -m deletefb.deletefb in the DeleteFB directory.

How To Use It

  • Make sure that you have a recent version of Python 3.x installed (preferably 3.6 or greater)

  • Make sure that you have Google Chrome installed and that it is up to date

  • Also install the chromedriver for Selenium. See here for an explanation of what the chromedriver does.

    • On Linux, it will be called something like chromium-chromedriver or just chromium.

    • On MacOS, it will be available via brew, with the following commands:

      brew tap homebrew/cask;
      brew cask install chromedriver
      
  • Run deletefb -E '[email protected]' -P 'yourfacebookpassword' -U 'https://www.facebook.com/your.profile.url'

  • The script will log into your Facebook account, go to your profile page, and start deleting posts. If it cannot delete something, then it will "hide" it from your timeline instead.

  • Be patient as it will take a very long time, but it will eventually clear everything. You may safely minimize the chrome window without breaking it.

Login

  • The tool will log in using the credentials passed to it. It will wait until the page https://www.facebook.com/ is loaded in order to avoid any issues with logging in. If you pass a 2FA token explicitly with the -F option, then it will try to enter that for you. If there are any issues, it simply pauses indefinitely to allow the user to resolve the problems, and then continues execution.

2FA

  • It is recommended that you disable Two-Factor Authentication temporarily while you are running the script, in order to get the best experience.

  • If you run into issues with Facebook complaining about your browser, currently the only workaround is to manually click through them.

  • If you do have 2-Factor Auth configured then the script will pause for 35 seconds to allow you to enter your code and log in.

  • You may also pass in a code by using the -F argument, e.g. -F 111111.

Delete By Year

  • The tool supports passing the --year flag in order to delete wall posts by year. E.g. -Y 2010 would delete posts from the year 2010. It is incompatible with any mode other than wall.

Unlike Pages

  • You may use -M unlike_pages to unlike all of your pages. The names of the pages will be archived (unless archival is turned off), and this option conflicts with the year option. This will only unlike your pages that you have liked. It will not unlike anything else (like books or movies).

Archival

  • The tool will archive everything being deleted by default in .log files. Currently they are simply stored as JSON objects for each line in the log. It will archive the content, and a timestamp if it is available. You may disable this feature by using --no-archive.

Headless mode

  • The tool supports running Chrome in headless mode with the --headless option, which may be preferable if you plan on running it in the background.

Bugs

If it stops working or otherwise crashes, delete the latest post manually and start it again after waiting a minute. I make no guarantees that it will work perfectly for every profile. Please file an issue if you run into any problems.

deletefb's People

Contributors

connorskees avatar hvtuananh avatar ijustlovemath avatar mimischi avatar shadahm avatar spirit-act avatar weskerfoot avatar wikijm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.