2 min read
  • Updated on 31 July 2020: – update the selector for the new facebook layout

In this article I will show you how to automatically unlike all of the pages you once liked at once and without installing any plugin.

Whatever the reason could be, in this way you will have the cleanest News feed timeline possible.

Free your mind from the clutter. Offline life is better.

Disclaimers

Disclaimer: It is needed a simple and short script which you should want to understand before running it, because it has the power to mess up with your Facebook account.

Disclaimer: Follow the steps at your own risk. I am not responsible for what your are doing. Are you?

Getting Started

There are three simple steps in between you and the clarity of your Facebook News feed. There is a short script involved, which you will copy and paste into the console of the Developer tools of your browser (Firefox, Chrome) while navigating into the Review the Pages you like.

In Short, what you will be doing:

  1. Get the script.
  2. Go to the Review the Pages you like.
  3. Run the script within the browser.

1. Get the script

Copy in your clipboard the code of the most recent version of the script from github, or try your luck with this one:

var doActions = [];

var pleaseUnlikePagesPlease = function () {
    
    var unlikePage = function(idx) {

        if (idx < doActions.length) {
          doActions[idx].style.border = "thick solid red";
          doActions[idx].click();
          console.log('task:', idx+1, 'of', doActions.length);
          setTimeout(unlikePage, 1000, idx+1);
        } else {
          clearTimeout();
          console.log('DONE. Why did you want in the first place to be bombarded by their updates?');
        }  
    };

    var idx=0;
    
    [...document.querySelectorAll('button[type="button"]')].forEach( (a) => { if (a.innerHTML.includes("Liked")) { doActions[idx++] = a; } });
    
    unlikePage(0);
}

2. Go to the Review the Pages you like

  1. Go to the Pages you like.

    Facebook Pages you like

  2. Click Get Started in the Review Liked Pages card.

    Facebook Review the Pages you like

  3. Select All pages from the top left dropdown menu.
  4. Scroll down entirely until all of your liked pages are visible in the thumbnail.

3. Run the script within the browser

  1. Press F12 to open the Developer tools window (Firefox, Chrome).
  2. Select Console.
  3. Read the security concerns message that the Facebook developers left for you.
  4. Paste the script into the prompt of the console
  5. Type pleaseUnlikePagesPlease(), hit return, and wait until it’s done.
  6. Click on Done.



If this article was useful to you, please share it using your favorite way for doing it! If you have suggestions of improvement or you’ve found something wrong, please let me know!


You are not being tracked on this website, no analytics, no cookies taken. I am still looking for a good plugin for comments which respects people's privacy. This website is hosted by Gitlab Pages which as far as stated by their general GitLab's privacy policy terms they collects potentially personally-identifying information like Internet Protocol (IP) addresses as mentioned in this thread.