I created a bookmarklet to expand all comments and replies in a given Facebook post. This applies to the full version of the Facebook website. Bookmarklets are not the prettiest things in the world, but here it is in case someone wants to use it:
Ctrl-click here to bring up a page with the bookmarklet in it. (I couldn’t figure out how to deliver this in WordPress without WordPress corrupting the URL.)
What does this do?
This expands a Facebook post, so that you can see/read all comments and replies from top to bottom without clicking.
I have found that Facebook posts that have replies are displayed with all or most of the replies hidden with links to show them. Even if I click the links, I usually only get up to a “page” more of replies. Also, clicking shifts the content, so I lose track of where I am. Sometimes I see separate links to previous and subsequent replies. Long comments are truncated with See More links. I have found that when a post is closed up like this, I click on a few links and lose interest very quickly.
You’ll notice I’m not providing a tutorial on how to use bookmarklets. If you don’t know what they are or how to use them, please look elsewhere for learning materials.
I mostly use Chrome on a PC, and I don’t use mobile devices. I tried Firefox and Edge once just to make sure things seem to work there (which they did), but I don’t use those browsers regularly. Bookmarks in Chrome were the easiest and most intuitive to figure out and use. Firefox, including its approach to bookmarks, frustrates me. Bookmarklets in Edge was a complete hack through the file system; really, not supported (but it does work).
Details of what this does
All output is dumped to the browser console. As such, you’ll want to hit F12 and have the console open before running the bookmarklet. When the script completes, it will display a numerical total of all comments and replies being displayed.
The bookmarklet clicks on the following links, sequentially. That is, it clicks and waits for the new content, which is checked for new links:
- View more comments
- View previous replies
- View more replies
- View x more replies
- [x] replies
- [user] replied
After all the comments and replies are obtained, it clicks any and all See More links.
It finds links to click by querying on CSS style names and is thus language independent, but see the Warnings ahead.
This isn’t recommended on posts that have many thousands of comments:
- First, you probably aren’t really interested in posts with that many comments.
- Second, I have found that Facebook stops delivering comments after 1,000; you can click the View more comments link, and nothing happens (visually, anyway). This bookmarklet bumps into the same limitation: it will iteratively click the View more comments link and eventually time out as nothing happens.
That said, you still might want to try this, if you are searching for a specific person’s comment or reply among many. Just be aware that eventually Facebook stops delivering comments.
Why did I do this?
I looked around to see if someone else had done something like this already, and of course I might have missed something, but it quickly became apparent to me that it would be easier to do this myself than to keep looking for something that actually worked.
- This works today (literally, today) based on how Facebook is rendered in HTML today. It might break tomorrow, and I might or might not fix it.
- Though the script doesn’t outright parse display text, it attempts to parse integers as a way to avoid clicking Hide links. I have tried about 10 different languages, all of which worked (I think). Please let me know if you find a problematic language, such as where the script shows and hides replies endlessly.
- This is intended to expand individual posts, not your entire news feed.