Last active
March 24, 2024 06:53
-
-
Save tobiasmuehl/8fcaa3f9a5f329d8fc06b141d082309b to your computer and use it in GitHub Desktop.
Copy this in your developers console to expand all posts and comments on a Facebook page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Scroll to bottom of the FB page to load all posts | |
// 2. Copy jQuery into the dev console, so that $ becomes available | |
// 3. Execute this script, which will expand all posts, comments and comments replies | |
// 4. Rerun to make sure every post/comment is picked up (after console.log is not logging more events) | |
// reset array | |
window.a = []; | |
// fill with links | |
$('.UFIPagerLink, .UFIReplySocialSentenceLinkText').add('div.userContent .see_more_link').add('div.userContent .see_more_link').each(function() { window.a.push(this) }); | |
$('.UFICommentActorAndBody a').filter(function(i, el) { return $(el).text() === 'See more' }).each(function() { window.a.push(this) }); | |
// click one by one (synchronously to prevent RAM flooding/browser crashes) | |
setTimeout(function() { | |
(function myLoop (i) { | |
setTimeout(function () { | |
window.a[i].click(); | |
console.log(i); | |
if (--i) myLoop(i); | |
}, 500) | |
})(window.a.length - 1); | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Auto expand all comments and replies on Facebook For this plugin...
https://developers.facebook.com/docs/plugins/comments
No way to limit but please help, thank you!