Packages you should install:
pip install InstagramAPI
pip install networkx
You should first create a text file named 'input.txt'.
- In the first line you specify the folder that you want to save your downloaded data from instagram api. The folder name should be ended with '/'.
- In the second line you type your instagram username
- In the third line you type your instagram password
- From the 4th line you should type usernames of your friends (whom you follow), each username in a separate line.
Then, you can easily run the graph.py file to draw your network.
Note that instagram has limitation for downloading huge data in a short period. So, it is recommended to limit the number of usernames that you type in 'input.txt'.
I'va used numbers instead of usernames for privacy. You can use usernames as the labels for nodes. You can zoom in each part of the network to see the relations better.