marcelja / facebook-delete Goto Github PK
View Code? Open in Web Editor NEWFast facebook activity deletion
License: MIT License
Fast facebook activity deletion
License: MIT License
Facebook seems to be rate limiting hard for anyone that uses this program. They might be looking at requests that are coming into https://mbasic.facebook.com and checking the User-Agent header which defaults to Go-http-client/1.1
in net/http and blocking people.
Allowing a user to set a random common User-Agent at runtime might help with the rate limiting.
Doesn't look that good. Any explanation to these results?
It seems my comments and likes are not deleting when using this tool. Anyone else experiencing this issue?
Hi,
thank you very much for this project. It seems your script is missing 2FA support. Would you be able to add that?
Thank you in advance,
Julian
Unfortunately, facebook detected I was deleting my comments and thinks I'm a bot/spammer now.
Now, randomly, I cannot reply to comments anywhere.
deleter.go seems to not be logging in correctly. Of course I sanity checked my password. Also looked at the URLs set and they seem to be up. I haven't tried firing up burp yet, but I figured I'd hit up the community first. Thoughts? Thanks!
? Please type your email
? Please type your password ***********************
Attempting Login...
panic: Failed to login
goroutine 1 [running]:
main.newFbLogin(0xc000073040, 0xc00009fec8)
/root/go/src/github.com/marcelja/facebook-delete/deleter.go:104 +0xe3
main.main()
/root/go/src/github.com/marcelja/facebook-delete/deleter.go:444 +0x45
exit status 2
After deleting, there are still all informations left in facebook's activity log. Would be nice if this could be deleted, too.
It would be great, if have chat history delete feature.
I ran the Windows executable and it all went fine when I tested on one of the accounts.
Once I tried running again, the program automatically closes without prompting for any login.
Hello. I have an issue that is interfering with my ability to use this script, and I am hoping that someone would be so kind to help me. To demonstrate that I have done my best to resolve this issue without help, I will first explain what I have done and have been trying to do. Then, I will show you the error and ask for help in resolving it. If you do not care about the first part, please skip to the second part.
First Part
As a non-technically-skilled user, I am using Windows to run this program instead of Linux. Your .exe for Windows users works, but as far as I can tell, I cannot select flags like rateLimit though it, and Facebook rate-limited me very quickly when I tried to do this. I considered installing Linux for the first time, in part in order to run this program. But I also do not want Facebook to log me as a Linux user, in the event that they keep copies of everything where we cannot delete it. If I become more technically-skilled and switch to Linux, I do not want to log into Facebook and let Facebook know that I use Linux.
So I followed your instructions on how to get the program from source, installing Go and Python and following your instructions. I struggled to log in this way, so I used your suggestion regarding cookies in order to make the program work. The EditThisCookie extension that you recommended appears a bit suspicious, due to what it discloses it collects in the Chrome extension store. So I decided to use the Cookie-Editor extension instead, and I used Github to load it unpacked as an extension in my browser, so I would not have to trust the Chrome web store. Regardless, this worked, and I was able to log in.
Second Part
At this point, I ran the program, set the rateLimit to 1000 ms, and it worked well. Eventually I got ratelimited at that, so I increased the rateLimit to 10000 ms later on. I have not encountered problems with ratelimiting at that rate. I was able to delete things from 2015 to the present year. However, I encountered a problem, and it has not been solved by restarting the script. I get the "panic: runtime error: invalid memory address or nil pointer dereference" error. I do not know why this error happened, since the program was working perfectly fine earlier. And since I am not technically-skilled, I do not know how to modify the program to fix this error.
Here is my command line output if I try to run the script now. Please note that I removed portions of it that might be a privacy risk. In those cases, I replaced the output with "personal information" in a text editor. Please let me know if I missed something that I should not show, since I am a low-IQ and low-skill user.
C:\personal information>go run deleter.go -rateLimit 10000
Waiting 10000 ms before search and delete requests.
Logged in with user: personal information
? Which years 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006
? Which months Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
? Which categories All App Activity, Comments, Event Invitations, Event Responses, Group Posts and Comments, Group Reactions, Instagram Photos and Videos, Likes and Reactions, Others' Posts To Your Timeline, Photos and Videos, Posts, Posts You're Tagged In, Search History, Spotify, Your Events
Searching elements from 2023:
Jan Feb Mar Elements found: 0 panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0xdf6545]
goroutine 1 [running]:
main.(*requester).Request(0xc00004d130, {0xc0004ac2d0?, 0xc0002db380?})
C:/personal information/deleter.go:72 +0x65
main.(*activityReader).ReadItems(0xc000022640, 0x3?, 0x2?, {0xe98543, 0x11})
C:/personal information/deleter.go:215 +0x8f
main.(*deleter).Delete(0xc000359dd0, {0xc000150400, 0x12, 0xf?}, {0xc000176600, 0xf, 0x1?})
C:/personal information/deleter.go:354 +0x3b5
main.main()
C:/personal information/deleter.go:633 +0x1045
exit status 2
How do I fix this runtime error? I am afraid that the limits of my problem-solving abilities ends here.
Thank you very much for this program and this help. I appreciate it.
EDIT: Also, I do not use pi-hole and probably do not have the technical expertise to do so. I do use a VPN, but I do not have an adblock filter on it. I would prefer that Facebook not know my current IP address when I am running a script like this, if possible. Regardless, since I had the VPN on when the program was working, I do not understand why it would not have caused this error back then.
Again, thank you for your help.
How do I logout of the cmd prompt on Windows? I've closed the prompt and restarted the machine but I'm still logged in.
I see "Marcel" user on binary launch :
Downloads % ./deleter-macos
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x12cd6e5]
goroutine 1 [running]:
main.(*requester).Request(0xc000097140, {0x136402e, 0x100cc67})
/Users/marcel/pr/facebook-delete/deleter.go:67 +0x65
main.(*fbLogin).IsLoggedIn(0xc0000b0480)
/Users/marcel/pr/facebook-delete/deleter.go:168 +0x34
main.newFbLogin(0xc000097140)
/Users/marcel/pr/facebook-delete/deleter.go:113 +0x53
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x289
Downloads % ./deleter-macos-arm64
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x10485e384]
goroutine 1 [running]:
main.(*requester).Request(0x14000113140, {0x10486fcd0, 0x23})
/Users/marcel/pr/facebook-delete/deleter.go:67 +0x84
main.(*fbLogin).IsLoggedIn(0x14000140440)
/Users/marcel/pr/facebook-delete/deleter.go:168 +0x40
main.newFbLogin(0x14000113140)
/Users/marcel/pr/facebook-delete/deleter.go:113 +0x60
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x32c
I don't believe I'm limited/blocked (I've gone to https://mbasic.facebook.com/ and signed in, have no notifications. Nothing in email).
Hey,
first time around the tool worked fine, login worked and I managed to delete some data to test the waters.
Now that I want to delete more, the program stopped working.
After selecting the timespan and activities to delete, the program instantly crashes without any error code or message.
I ran it as a normal user, with admin access redownloaded the latest binary file.
What I haven't yet tryed out is to delete the cookie that keeps my login information, maybe that is where the problem is located.
Where is the cookie stored on windows? I couldn't yet find it.
I noticed after running the script for a while that I started get 0 events for everything. I assumed I was getting ratelimited but all the requests were still returning 200
's. Eventually I took a peek at the response body and saw the message
We limit how often you can post, comment or do other things in a given amount of time in order to help protect the community from spam. You can try again later
In a div. If you'd like I can try and patch this to give a cleaner error message. I'd like some advice though, right now my only thought is to just search for a portion of that string in the body which doesn't seem ideal.
Thanks by the way. I've tried to use a bunch of tools trying to solve this problem and yours is the only one that works, and it works great :)
You are an awesome engineer!
Resolved
The years are hardcoded, but even if I add 2021 manually, it does not list any activity somewhy.
Delete everything based on a string/regex? Is this possible?
current set up is logged in account, entered password.
year / month / posts are selected.
i have maybe 20 post, but elements found is up to 31,000 and doesn't seem to be stopping ever.
any advice?
I recently stumbled on this error prompt.
It might be due to fb forcing me to change password.
I tried modifying debug_login.sh to input my new creds, but I can't make it work. (I don't/can't code)
PS C:\Users\jaspe\Documents\GitHub\facebook-delete> go run deleter.go -rateLimit 7000
Waiting 7000 ms before search and delete requests.
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
main.(*fbLogin).StoreProfileID(0xc000064400, {0xc0000fe000, 0xf232ff})
C:/Users/jaspe/Documents/GitHub/facebook-delete/deleter.go:178 +0xbe
main.(*fbLogin).IsLoggedIn(0xc000064400)
C:/Users/jaspe/Documents/GitHub/facebook-delete/deleter.go:172 +0x75
main.newFbLogin(0xc000056fb0)
C:/Users/jaspe/Documents/GitHub/facebook-delete/deleter.go:113 +0x53
main.main()
C:/Users/jaspe/Documents/GitHub/facebook-delete/deleter.go:522 +0x289
exit status 2
PS C:\Users\jaspe\Documents\GitHub\facebook-delete>
After a run, I'd except an output like this:
2011:
All App Activity: 12 deleted
Comments: 142 deleted
Total: 164 deleted
2010:
...
something like this.
Ps: really cool program, thank you for making this. I used a chrome extension before and it's not reliable, it's slow and it misses a lot of things, since it's just a scraper.
Hi, using win 10, downloaded lastest win exe file. typed my login credentials and got the message "attempting to login" that is displayed like 1 second before cmd shuts down. is it not working or am I doing something wrong?
cheers!
@AlexKalopsia mentioned in #50 that many users have to set a very high limit rate to not get blocked. It would be good if we can collect some ideas here on what we could do to not need such a high limit rate.
I'm wondering if it makes a difference that we have parallel requests enabled:
Line 20 in 0590b9e
1
could help to not get blocked.
Another thing that we could do: Not using the default go user agent. I already tried that but didn't get it working (#33).
Facebook may have changed something on their end, deleter.go is no longer finding any elements to delete.
Searching elements from 2020:
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Elements found: 0
Deleting elements from 2020:
0 [________________________________________________________________________________________________________________________________________________________________________________________] ?% ? p/s 0s
I downloaded the latest binary file, but it fails to start:
❯❯❯ rm -rf /Users/roeniss/.go-cookies # actually, it doesn't exist
❯❯❯ sudo ./deleter-macos # I also tried deleter-macos-arm64
Waiting 100 ms before search and delete requests.
panic: Unable to parse profile information from cookies. Try manually deleting the cookie file stored in /Users/roeniss/.go-cookies
goroutine 1 [running]:
main.(*fbLogin).StoreProfileID(0xc00007e540, {0xc000420000, 0x15d6})
github.com/marcelja/facebook-delete/deleter.go:186 +0x159
main.(*fbLogin).IsLoggedIn(0xc00007e540)
github.com/marcelja/facebook-delete/deleter.go:177 +0x75
main.newFbLogin(0xc000011180)
github.com/marcelja/facebook-delete/deleter.go:118 +0x53
main.main()
github.com/marcelja/facebook-delete/deleter.go:548 +0x38c
The ~/.go-cookies
file is never created. Is this known issue?
`xxxxxxxxx@xxxx:~/Downloads$ ./deleter-linux
? Please type your email xxxxxxxxxxxxxxxx
? Please type your password *************
Attempting Login...
panic: Failed to login
goroutine 1 [running]:
main.newFbLogin(0xc000097010, 0x0)
/Users/marceljankrift/facebook-delete/deleter.go:102 +0xdd
main.main()
/Users/marceljankrift/facebook-delete/deleter.go:394 +0x42`
Items are not deleted. They are sent to the "Archive" which then must manually be sent to "Trash" which then must manually be deleted or you can try trusting Facebook to delete items in trash after 30 days.
Hi,
I have an issue with the first step - login. As soon as I type my password, login attempt is made, and it results in facebook-delete immediately crashing.
Here is the output that I'm getting from running the app:
C:\Users\Anton\Downloads>deleter-windows.exe
? Please type your email [email protected]
? Please type your email [email protected]
? Please type your password *************
Attempting Login...
panic: Failed to login
goroutine 1 [running]:
main.newFbLogin(0xc00004cfd0, 0xc00004c210)
/Users/marcel/pr/facebook-delete/deleter.go:118 +0xe5
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x1f9
C:\Users\Anton\Downloads>deleter-windows.exe
? Please type your email [email protected]
? Please type your email [email protected]
? Please type your password *************
Attempting Login...
panic: Failed to login
goroutine 1 [running]:
main.newFbLogin(0xc000088fb0, 0xc000088200)
/Users/marcel/pr/facebook-delete/deleter.go:118 +0xe5
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x1f9
When I try and go run deleter.go
, the terminal returns req.jar.Save undefined (type *cookiejar.Jar has no field or method Save)
.
From the docs it looks as if cookiejar doesn't have a Save method, so I am a bit confused.
Not sure what the speed Facebook wants us to run at is, but deleting several thousand items got me locked out.
Custom rate-limit option would be swell!
This is the best FB scrubber I've found so far, it's fast, and it works. How difficult would it be to allow filtering by month and day?
Hi,
I've attempted to use this and followed the steps. Binary has been made executable.
I can log in successfully. to https://mbasic.facebook.com and don't have 2FA enabled for this account. I am using a test account before I launch it against my actual FB account. The following is returned:
Why is marcels' user folder structure listed?
<redacted_localuser>@<redacted_localhost> FB Deleter % ./deleter-macos
? Please type your email <redacted>@outlook.com
? Please type your password ************************
Attempting Login...
panic: Failed to login. Please open https://mbasic.facebook.com in a browser and login there. Facebook might requires an additional verification. Afterwards, you can try again.
goroutine 1 [running]:
main.newFbLogin(0xc00010d140)
/Users/marcel/pr/facebook-delete/deleter.go:118 +0xad
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x289
<redacted_localuser>@<redacted_localhost> FB Deleter %
I was able to run it for a full year. Then it automatically closed after finishing (I'm assuming that's the intended behavior).
But when I tried it for another run on another year, it automatically closes just as it starts scanning.
on w10 btw
This is just a suggestion, but would it be possible to write a similar tool for twitter?
That you can use it to delete retweets, tweet and likes?
Hi - your script work great. I'm just getting tired of initiating the script every day once the ban hits by going through each year and month and post type...
Is there a way to pass these in as parameters instead of using the interactive tool? That would make my life much easier. Thanks
After typing email & password, the app crashes.
I'm on Windows 10 x64, no antivirus installed.
Facebook asked me to change the password after this.
Hi there, I found your tool and I able to use to deleted some data
> Wed 08 Sep 2021 02:54:41 PM +08
robbi@debian: pts/1: /home/robbi/RM-RF
└─ $ ./deleter-linux --rateLimit 5000
Waiting 5000 ms before search and delete requests.
Logged in with user: XX XX (profile ID: XXXXXXX)
? Which years 2021
? Which months Jan
? Which categories All App Activity, Comments, Event Invitations, Event Responses, Group Posts and Comments, Group Reactions, Instagram Photos and Videos, Likes and Reactions, Others' Posts To Your Timeline, Photos and Videos, Posts, Posts You're Tagged In, Search History, Spotify, Your Events
Searching elements from 2021:
Jan ... ... ... ... ... ... ... ... ... ... ... Elements found: 200
Deleting elements from 2021:
200 / 200 [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 1 p/s 4m25s
Group Reactions: 1 deleted
Likes and Reactions: 4 deleted
Search History: 195 deleted
Total: 200 deleted
It my trial run and I want to delete by per month.. but when I try for second round, It doesnt work anymore. I keep getting blocked and asked to change password everytime I execute.
I try deleting the cookies and still get same thing.. it has been two day.
> Thu 09 Sep 2021 03:31:04 PM +08
robbi@debian: pts/2: /home/robbi/RM-RF
└─ $ ./deleter-linux --rateLimit 10000
Waiting 10000 ms before search and delete requests.
? Please type your email [email protected]
? Please type your password *********************
Attempting Login...
panic: Failed to login
goroutine 1 [running]:
main.newFbLogin(0xc00018aea0, 0xc000182008)
/Users/marcel/pr/facebook-delete/deleter.go:118 +0xde
main.main()
/Users/marcel/pr/facebook-delete/deleter.go:522 +0x1f3
I wonder and guesss, it maybe cause by user agent signature by this tool
This is my browser user agent
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
When I use web browser (after change new pass and each time before I exec the tool), I able to use fb. So after 1h-3h, I come back and use the tool.. my account will be blocked and need to change pass again.
Let me know if I need to add more information
Hello,
I'm sure it's something stupid but I cannot figure it out.
I was using this utility and it seem to be working. I then seem to have ran out of requests (every deletion failed) so I just killed the program with Ctrl+C to start over. Since then I have not been able to run the utility again.
I am using Windows 11, I have tried re-downloading the exe, I'm still having the same message.
I also tried on a Raspberry Pi I have, running Raspbian, and I get the same message too
What confuses me is that it was literally working 1hr ago.
Appreciate any ideas
Thank you!
Hi thanks for creating this amazing tool!
Seemingly FB now blocks all log ins, even though I accept the login as legitimate.
Edit: Other issues are now discussing this.
I'm not familiar with Go Programming Language, any way how to solve this?
Go Version: go1.16.6
Operating System: Arch Linux and Windows 10
facebook-delete> go run deleter.go
deleter.go:7:2: no required module provides package github.com/AlecAivazis/survey; to add it:
go get github.com/AlecAivazis/survey
facebook-delete> go get github.com/AlecAivazis/survey
go get: github.com/AlecAivazis/[email protected] updating to
github.com/AlecAivazis/[email protected]: parsing go.mod:
module declares its path as: gopkg.in/AlecAivazis/survey.v1
but was required as: github.com/AlecAivazis/survey
facebook-delete> go run deleter.go
deleter.go:7:2: no required module provides package github.com/AlecAivazis/survey; to add it:
go get github.com/AlecAivazis/survey
facebook-delete> go get github.com/AlecAivazis/[email protected]
go: downloading github.com/AlecAivazis/survey v1.8.1
go: downloading gopkg.in/AlecAivazis/survey.v1 v1.8.8
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: downloading github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
go get: added github.com/AlecAivazis/survey v1.8.1
go get: added gopkg.in/AlecAivazis/survey.v1 v1.8.8
facebook-delete> go run deleter.go
# command-line-arguments
.\deleter.go:129:15: not enough arguments in call to survey.AskOne
have (*survey.Input, *string)
want (survey.Prompt, interface {}, survey.Validator, ...survey.AskOpt)
.\deleter.go:135:15: not enough arguments in call to survey.AskOne
have (*survey.Password, *string)
want (survey.Prompt, interface {}, survey.Validator, ...survey.AskOpt)
.\deleter.go:314:15: not enough arguments in call to survey.AskOne
have (*survey.MultiSelect, *[]string)
want (survey.Prompt, interface {}, survey.Validator, ...survey.AskOpt)
edit: posted in wrong repo :)
Just did a run. Program reports like everything is being deleted but nothing is removed when i check the activity log. Might have something to do with a new layout for activity log on facebook. Program isnt aware its failing?
PS: might just be getting archived instead of being deleted :|
I get consistent temp bans from facebook using this:
"Jan Elements found: 0 panic: ratelimited, please open https://mbasic.facebook.com and navigate to your activity log to see more information."
This is after they unbanned me.
Thank you for the app!
I get this error: "cannot execute binary file: Exec format error"
after trying to run the executable on my Vero 4K+ (OSMC).
Do I have some dependancy missing?
Every time i try to execute deleter it doesn't find anything to delete on my profile. what goes wrong with it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.