Skip to content

Instantly share code, notes, and snippets.

Avatar

Albert Arul Prakash Rajendran AlbertArulPrakash

  • Bangalore, India
View GitHub Profile
@AlbertArulPrakash
AlbertArulPrakash / fb-expand-all-comments-replies.js
Last active Nov 6, 2020
When you manage a facebook page or facebook group, there are usecases where you want to expand all the comments and replies of every facebook posts/threads. This below script helps you to expand all the comments and its replies.
View fb-expand-all-comments-replies.js
// base code is not by me but by person from stackoverflow thread https://meta.stackexchange.com/a/289117/881857
// Modifications made in the search classes (due to fb changes) and if conditions to push only comments and replies.
function TriggerSingleLink(links, index) {
if (index >= links.length) {
console.log("All done.");
return;
}
var oLink = links[index];
console.log(oLink.text());