Please make an issue if it is not working for you! I'll do my best to help :) Please read this entire readme before doing anything.
- Check you have all the requirements installed.
- Create a
.env
file with the following content:
CHROME_DRIVER_PATH="/home/you/path/to/the/chromedriver"
FRIENDS_LIST="https://www.facebook.com/yourUsername/friends"
You can get a Chrome driver on https://chromedriver.chromium.org/downloads and make sure you have a username on Facebook.
3. Run python facebook.py
.
4. Log in to Facebook in the pop up window, then go back to the terminal and press enter.
- Once it has finished, open Gephi and click
new project
. - Go to
Data Laboratory
, thenedges
. Now,import spreadsheet
. Selectfacebook.csv
. - Go to
Overview
. Choose theForce Atlas
layout and press play. - Just kinda play around with Gephi until you get something you like :) you can even colour nodes.
- Go to
preview
to make sure you like how it looks. File > Export >
whatever filetype you want.- Finally you can go to an image editor to draw labels and stuff.
- Chrome browser
- Selenium:
pip install Selenium
- TQDM:
pip install tqdm
- DotEnv:
pip install python-dotenv
- Driver according to your Chrome version and OS: https://chromedriver.chromium.org/downloads
- Gephi, unless you have some other plan for drawing your graph
Currently does not detect facebook friends who do not have usernames.
For example, www.facebook.com/user_name
is detected, but www.facebook.com/profile.php?id=123456789
is not.
Also ignores friends who have no mutual friends, and those whose accounts are deactivated.
Waits a few seconds before going to different profiles. This makes it slow, but if we go too fast, Facebook will give a temporary ban.
I have tried to reduce the risk of getting a temporary ban, but I can't guarantee anything. If you get banned, it is not my responsibility.