Daily-Automated Instagram Account is a program that automatically updates ones chosen Instagram account(s) on a schedule (preferably daily). It selects images based on category from Unsplash and automatically adds a matching caption, including hashtags.
-
To start things off you'll first need to register as a Unsplash developer. This requires nothing more than a regular signup and is totally free.
-
Create a demo app (it's limited to 50 requests an hour, but this is more than enough, knowing that one photo-upload equals 1 request)
-
Copy your
API ID
,SECRET
andCALLBACK URL
and inlines 20-22
:
const unsplash = new Unsplash({
applicationId: process.env.UNSPLASH_API_ID,
secret: process.env.UNSPLASH_SECRET,
callbackUrl: process.env.UNSPLASH_CALLBACK_URL
});
Replace the process.env variables with your copied values.
Alternatively you could create your own .env
file and add this to the file:
UNSPLASH_API_ID = your_api_id
UNSPLASH_SECRET = your_api_secret
UNSPLASH_CALLBACK_URL = your_callback_url
- Head to
accounts.js
and replace the values inside the array with your own in this format:
{
username: 'your_username',
password: 'your_password',
category: 'search keywords',
popularTags: '#prefix #tags',
searchLimit: 10000
}
searchLimit
is the limit of searches in a search result.
Make sure this is smaller than the total amount of searches in a result.
You can check this by searching your keywords on Unsplash's website.
- Lastly, create a directory called
cookies
in the root directory. Inside this folder, create an empty file calledyourusername.json
. This should be the same name as in youraccounts.js
file. If you use multiple accounts, just add multiple files.
The program will work after you enter node app
in the command line. However, when you now exit the program by hitting Ctrl+C
, by exiting the command line or closing it any other way, it will not run periodically anymore.
To do this you could run the program on a server, for example on Heroku or DigitalOcean.
- You may not use this repository for any spam-related actions