- Run
python3 -m venv flask
- Run
. flask/bin/activate
to activate the virtual environment - Run
pip3 install -r requirements.txt
to install all the required libraries - Run
./application.py
- Go to the graph api explorer https://developers.facebook.com/tools/explorer/
- Get personal user access token
- Go to shell that you will be running the application on
- Create environment variable
export FB_API_KEY="<USER_ACCESS_TOKEN>"
. To check if environ variable created successfully,printenv
- Run
./application.py
To call endpoints execute curl -X GET http://localhost:5000
and append the endpoint.
e.g. curl -X GET "http://localhost:5000/company/company_name?start_time=2015-10-01T08:45:10.295Z&end_time=2015-10-01T08:45:10.295Z"
- When you add new libraries, make sure to update requirements.txt. You can do this by doing
pip freeze > requirements.txt
.
running python3 big_test_file.py
will run a test suite that will generate std output and html files.