no-facebook-symbol1.png

If you’re not sure how to follow the instructions in this post, don’t worry. Feel free to ask a family member, friend or colleague to help you with it.

Warning! Danger! Beware! Watch out! Disclaimer: Be prepared to lose your comments, posts, and other information stored about you, regardless of whether it was added to Facebook by yourself or by someone else. This script does not know or care what it is deleting. If it can be deleted, it will be deleted. And once something is deleted, you cannot undelete it. Even if something was deleted on Facebook that had personal, financial, sentimental, academic, criminal/illegal, important, unimportant, historical or any other kind of value for you or for someone else, then keep in mind that it’s gone forever. Well, except if Facebook keeps backups of your deleted data, which is terrifying. Facebook is also the worst possible place to store your data, if that is the case. Your friends and chat messages will not be deleted, you can delete them manually.

0. Go to this link to request Facebook to delete your account. It does not deactivate your account, it deletes your account (according to Facebook). Here is the link: Delete Facebook

1. Visit the following pages:

https://www.facebook.com/{your_profile_name}
https://www.facebook.com/your_profile_name/allactivity
https://www.facebook.com/{your_profile_name}/allactivity?privacy_source=activity_log&log_filter=cluster_200

2. Press F12 to open the developer console (this works in most new browsers – remember to ask someone for help if you can’t get it to work).

3. Copy, paste and run the following script, and watch the delete magic happen.

var canCheck = true;
var speed = 10; // make it a smaller number to make it go faster

var facebookDelete = setInterval(function() {
	if (!canCheck) return;

	canCheck = false;

	try {
		var el = [
			document.getElementsByTagName('button'),
			document.getElementsByTagName('label'),
			document.getElementsByTagName('a'),
			document.getElementsByTagName('div'),
			document.getElementsByTagName('span')
		]
		var found = false;
		var lookFor = ['Edit', 'Close', 'Allowed on Timeline', 'Delete', 'Unlike', 'Delete Post', 'Story options', 'It\'s spam', 'Report/Mark as Spam', 'Remove Post', 'nfxQuestionNamedspam', 'Remove Tag', 'Remove Reaction', 'OK'];
		var dontRemoveOrConsiderAsFound = ['a', 'label', 'div'];
		var dontClickButtonsTitled = ['Close'];
		var stopIfButtonFound = ['Delete Post'];

		for (var i = 0; i < el[0].length; ++i)
			if (stopIfButtonFound.indexOf(el[0][i].innerText) != -1) {
				if (dontClickButtonsTitled.indexOf(el[0][i].innerText) == -1 &&
						el[0][i].getAttribute('data-clicked') != '1') {
					el[0][i].click();
					el[0][i].setAttribute('data-clicked', '1');
				}
				return;
			}

		for (var i = 1; !found && i < el.length; ++i) {
			var a = el[i];
			for (var j = 0; !found && j = 0 ||
						lookFor.indexOf(a[j].innerText) = 0) &&
						(a[j].tagName.toLowerCase() != 'button' || dontClickButtonsTitled.indexOf(a[j].innerText) == -1) &&
						a[j].getAttribute('data-clicked') != '1') {
					a[j].click();
					a[j].setAttribute('data-clicked', '1');
					if (dontRemoveOrConsiderAsFound.indexOf(a[j].tagName.toLowerCase()) == -1) {
						a[j].parentNode.removeChild(a[j]);
						found = true;
					}
				}
			}
		}

		if (!found)
			document.body.scrollTop = document.body.scrollHeight;
	}
	catch (e) {
	}
	finally {
		canCheck = true;
	}
}, speed);

4. To stop the above automatic delete script, do this:

clearInterval(facebookDelete);

Enjoy your clean Facebook activity history.

Last updated: 19 July 2017

no-facebook-symbol1.png