Facebook friend network forked from here.
- Chrome browser
- Selenium
- TQDM
- DotEnv
- Webdriver Manager
- Gephi, unless you have some other plan for drawing your graph
Install command: pip install Selenium python-dotenv tqdm webdriver-manager
- Check you have all the requirements installed.
- Change the Facebook link in
.env
to your username:
FRIENDS_LIST="https://www.facebook.com/yourUsername/friends"
- Run facebook.py.
- 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 the 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.
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.