Using the wonderful Python-Instagram library
- Python 2.7.x
- Virtualenv
- PIP
- Heroku Toolbelt / Foreman
- Instagram Account
How to install these requirements is here, halfway down page
Navigate to code directory in Terminal and run following command
-
Create and activate virtual environment for directory.
virtualenv venv . venv/bin/activate
-
Install requirements for app
pip install -r requirements.txt
-
Create new app here, http://instagram.com/developer/clients/register/.
-
Set OAuth redirect_uri to
http://localhost:5000/instagram_callback
In your Application settings, find the tokens and keys, you will need these to use the Instagram API.
Create .env file with the following
CLIENT_ID=YOURCLIENTIDHERE
CLIENT_SECRET=YOURCLIENTSECRETHERE
SECRET_KEY=SECRET_KEY_FOR_FLASK
REDIRECT_URI=http://localhost:5000/instagram_callback
Save as .env in your code directory.
To start server you must have Foreman / Heroku toolbelt installed. Foreman will read your .env files to get your credentials.
Start your engines
foreman start
OR
. start
Open browser, http://localhost:5000
Ctrl+C