Facebook Post Deletor

I published the code snippet to delete Facebook posts as a Chrome extension to make it easier for non-technical users to take advantage of it.

You can get the extension from the link below:
https://chrome.google.com/webstore/detail/fb-post-deletor/opbnkoiemagfialjgeablaeahkpkcgbb

The source code for the extension is published on github:
https://github.com/hasankhan/fb-post-deletor

Delete all tweets from Twitter

Just as we found a way to delete all posts from Facebook, we can apply the same technique to Twitter. Follow the steps below to wipe clean all your old tweets on Twitter.

  1. Log in to Twitter using Chrome browser
  2. Go to your timeline
  3. Scroll all the way down to your first tweet in order to load all the tweets in the UI.
  4. Open developer console (F12)
  5. Paste the following javascript snippet in the ‘Console’ tab
function dT(){var e=document.getElementsByClassName("js-actionDelete");e&&e.length>0&&(e[0].click(),setTimeout(function(){var e=document.querySelector("div#delete-tweet-dialog button.delete-action");e&&e.click()},1e3))}var deletor=setInterval(dT,1e4);

It will now delete your old tweets every 10 seconds for as long as the browser window is open. Enjoy!

Delete all posts from Facebook

I have a habit of cleaning up my social media profile every now and then and starting over fresh. However manually deleting posts can be a pain, specially if you’re doing it after a long time.

I could technically use Facebook SDK and write a program to do this for me however it seems that Facebook APIs only allow deleting those posts that are made from the same app that is deleting the posts. However I can go to my activity page on Facebook and delete posts one by one manually.

So I decided I’ll just automate this using javascript snippet. Follow the steps below to wipe clean all your old posts (include pics) on Facebook.

  1. Log in to Facebook using Chrome browser
  2. Go to your activity log
  3. Scroll all the way down to your first post in order to load all the posts in the UI.
  4. Open developer console (F12)
  5. Paste the following javascript snippet in the ‘Console’ tab
function dP(){var e=document.querySelector(".audienceSelectorNoTruncate ~ div.uiPopover a");e&&e.click();var t=document.querySelectorAll("a[ajaxify*=delete]");t.length>0&&t[t.length-1].click(),setTimeout(function(){var e=document.querySelector("div[role=dialog] form[rel=async] button[type=submit]");e&&e.click()},1e3)}var deletor=setInterval(dP,1e4);

It will now delete your old post every 10 seconds for as long as the browser window is open. Enjoy!

Also check out Delete all tweets from Twitter