Skip to content

Instantly share code, notes, and snippets.

@SAFAD
Created February 24, 2022 20:57
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SAFAD/dfc16d4d485aa78031d47c458e7b652e to your computer and use it in GitHub Desktop.
Save SAFAD/dfc16d4d485aa78031d47c458e7b652e to your computer and use it in GitHub Desktop.
How to unlike all Facebook page at once

Unlike all facebook pages 2022

Go to: https://m.facebook.com/pages/launchpoint/liked_pages

Paste the following script into console (F12 -> console):

var unlike_all = ()=> {
	[].slice.call(document.querySelectorAll('[data-sigil="action-title"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()});
	window.scrollTo(0,document.body.scrollHeight);
	window.setTimeout(unlike_all, 3 * 1000)
};
unlike_all();

you're done!

@erubenz
Copy link

erubenz commented Feb 25, 2022

It's not unliking pages that no longer exist but still stuck in my liked list.

@ycsmne
Copy link

ycsmne commented Feb 25, 2022

Didn't work for me :/

@MahmoudKKandil
Copy link

@aalromaissy
Copy link

I think Mahmoud has a point. If the script can work on activity log that would be perfect.

@aalromaissy
Copy link

I tried to run the script but I always get blocked from unliking pages

Copy link

ghost commented Apr 12, 2022

I tried to run the script but I always get blocked from unliking pages

yes me 2

Copy link

ghost commented Apr 12, 2022

would be more powerful if worked on the activity log of liked pages to avoid being blocked https://www.facebook.com/usrID/allactivity?activity_history=false&category_key=LIKEDINTERESTS&manage_mode=false&should_load_landing_page=false

did you make it mahmoud?

Copy link

ghost commented Apr 12, 2022

I think Mahmoud has a point. If the script can work on activity log that would be perfect.

how can we request a script from other users?

@MahmoudKKandil
Copy link

MahmoudKKandil commented Apr 12, 2022

would be more powerful if worked on the activity log of liked pages to avoid being blocked https://www.facebook.com/usrID/allactivity?activity_history=false&category_key=LIKEDINTERESTS&manage_mode=false&should_load_landing_page=false

did you make it mahmoud?

it's not going to work automated
open the activity log and load some liked pages
then paste this line
[].slice.call(document.querySelectorAll('[aria-label="Action options"')).map(x=>{x.click()})
then this
[].slice.call(document.querySelectorAll('[role="menuitem"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()})
you have to refresh the page and do the steps again
it cost me like 15mins to unlike 15k pages

Copy link

ghost commented Apr 13, 2022

would be more powerful if worked on the activity log of liked pages to avoid being blocked https://www.facebook.com/usrID/allactivity?activity_history=false&category_key=LIKEDINTERESTS&manage_mode=false&should_load_landing_page=false

did you make it mahmoud?

its not going to work as the script you posted after you open the activity log you need to load some liked pages then paste this line to press all buttons [].slice.call(document.querySelectorAll('[aria-label="Action options"')).map(x=>{x.click()}) after you find all are pressed you paste this lin [].slice.call(document.querySelectorAll('[role="menuitem"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()}) then you have to refresh the page and do the steps again it cost me like 15mins to unlike 15k pages

well, im not keen on javascript i have tried to use functions u used above

man you are a legend!!! ty

@MahmoudKKandil
Copy link

MahmoudKKandil commented Apr 13, 2022

would be more powerful if worked on the activity log of liked pages to avoid being blocked https://www.facebook.com/usrID/allactivity?activity_history=false&category_key=LIKEDINTERESTS&manage_mode=false&should_load_landing_page=false

did you make it mahmoud?

its not going to work as the script you posted after you open the activity log you need to load some liked pages then paste this line to press all buttons [].slice.call(document.querySelectorAll('[aria-label="Action options"')).map(x=>{x.click()}) after you find all are pressed you paste this lin [].slice.call(document.querySelectorAll('[role="menuitem"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()}) then you have to refresh the page and do the steps again it cost me like 15mins to unlike 15k pages
well, im not keen on javascript i have tried to use functions u used above

man you are a legend!!! ty

glad it helped :)

@Khotyz
Copy link

Khotyz commented Jun 28, 2022

would be more powerful if worked on the activity log of liked pages to avoid being blocked https://www.facebook.com/usrID/allactivity?activity_history=false&category_key=LIKEDINTERESTS&manage_mode=false&should_load_landing_page=false

did you make it mahmoud?

its not going to work as the script you posted after you open the activity log you need to load some liked pages then paste this line to press all buttons [].slice.call(document.querySelectorAll('[aria-label="Action options"')).map(x=>{x.click()}) after you find all are pressed you paste this lin [].slice.call(document.querySelectorAll('[role="menuitem"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()}) then you have to refresh the page and do the steps again it cost me like 15mins to unlike 15k pages

well, im not keen on javascript i have tried to use functions u used above

saved my day, thanks!

@iatpatelishan
Copy link

[].slice.call(document.querySelectorAll('[aria-label="Action options"')).map(x=>{x.click()})

setInterval(function(){
  [].slice.call(document.querySelectorAll('[role="menuitem"')).filter(x=>x.innerText.indexOf('Unlike') !=-1).map(x=>{x.click()})
  setInterval(function(){
    location.reload();
  },1000);

},1000);

@leviouwendijk
Copy link

It works very well but at some point facebook shrinks the amount of pages that appear in the activity log upon refreshing. Eventually it says "Nothing to show" even though there's about 600+ pages that are still liked. After waiting I can continue, but I don't know upon what length of time this is based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment