This project provides a basic backend to manage and configure Instagram Access Tokens through the Instagram Basic Display API. It's written in PHP, based on the Yii 2 Framework by David Hirtz for Anakin.
commands contains the console controllers for the cron job
config/ contains application configurations
controllers/ contains web controller classes
messages/ contains translations (if required)
models/ contains model classes
runtime/ contains files generated during runtime
views/ contains view files for the web application
web/ contains the entry script and web resources
This project requires PHP 7.4 or higher and MySQL 8.x. Detailed requirements can be found by running Composer.
Fetch source code via GIT.
git init
git remote add origin git@github.com:davidhirtz/instafeed.git
git fetch origin
git branch master origin/master
git checkout master
If you do not have Composer, you may install it by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
curl -sS https://getcomposer.org/installer | php
You can then install the dependencies using the following command:
php composer.phar install --no-dev
Create file config/params.php
with your sensitive information, which should not be added to the version control. The
file must include a cookie validation key, which can also be auto-generated by running the command below.
<?php
return [
'cookieValidationKey' => 'YOUR-COOKIE-VALIDATION-KEY',
];
php yii params
The database credentials are located in config/db.php
. You can also run the migrations with the command below, which
will set up the database configuration before applying the migrations.
<?php
return [
'dsn' => 'mysql:host=127.0.0.1;dbname=DATABASE',
'username' => 'USER',
'password' => 'PASSWORD',
];
php yii migrate
Important: Directories runtime
and web/assets
need write permissions for web and console user.
You can enable development mode by setting an environment variable YII_ENV
to "dev" or "local". The latter is excluded
from version control.