Skip to content
This repository was archived by the owner on Dec 29, 2020. It is now read-only.

Latest commit

 

History

History
21 lines (15 loc) · 1.43 KB

README.md

File metadata and controls

21 lines (15 loc) · 1.43 KB

Due to the disappearance of the version 2.3 of the Facebook API, it is no longer possible to get the data of those groups in which you are not admin.


Facebook Group Scraper

Save in a CSV file threads with their comments, and associated data, of a Facebook group (even closed groups where you are not an admin but a member).

Usage

Just download the file fb_group_scraper.py and run the script:

$ python fb_group_scraper.py <group_id> <access_token> [max_threads]

Group ID

You usually can find the group ID looking on your browser. If you access to the chosen group, you will see a URL like https://www.facebook.com/groups/1234567890, where the group ID is 1234567890. In the case of there is no number, try with a tool like Lookup-ID.com.

Access Token

Moreover, you will need an access token to use this script. Go to the Graph API Explorer and get a User Access Token. Pay attention to select the version 2.3, because is the last one that allows get data from a closed group if you are only a member. Select the user_groups option and click on the Get Access Token button. Then you can see a long alphanumeric word, which will be your token.

Max Threads

This is an optional argument that limits the amount of threads you can scrape. Note that if there are a lot of posts in the group, the script will require a fairly long time.