-
If you download a copy of your Facebook data then you will find only your own comments but not those of your friends, even if these comments were made on your own posts.
-
As well, it is not possible to extract these comments from the Facebook Graph-API:
Comments Edge. When read with a User access token, the
/comments
edge returns empty data for the following nodes: Album, Photo, Post, Video
- Scraping is not allowed by Facebook.
However, you may occasionally need to extract and archive a particular conversation taking place in the comments of a Facebook post.
The python script facebook-comments.py
parses the html page of the post to extract the comments, without using the dedicated Python libraries requiring authentication.
Preliminary steps to save the file post.html
:
- Click on the post you want to extract comments
- Expand all comments
- Save as HTML page
python facebook-comments.py -i post.html > comments.txt
[--dialogue True]
Optional argument:
--d, dialogue DIALOGUE Format text comments to fit the Dialogue Obsidian Plugin if DIALOGUE=True
The optional argument --dialogue True
adds some symbols before author names and paragraphs to be compatible with the syntax of Obsidian Dialogue plugin.