Media Source Management
Media Source is a collection of Media (images, videos and albums) fetched from given source (Instagram @profile or #hashtag).
Media Sources can be managed by visiting "Dashboard" > "Insta Media Gallery" > "Media Sources" page.
Add/edit Media Source
Before you add any gallery to your Pages, you have to create one or more Media Sources.
Click "Add new Media Source" and fill all required fields:
- Account Type
Fill with value from "Instagram Account Connection Tool". - Access Token
Fill with value from "Instagram Account Connection Tool". - Instagram User ID
Fill with value from "Instagram Account Connection Tool". - Instagram Username
Fill with value from "Instagram Account Connection Tool". - Hashtag
Requires BUSINESS account type selected.
Filling in this field will switch Media Source from @user to #hashtag. Enter without # sign. - Hashtag Mode
Requires BUSINESS account type selected. - Folder for imported Media
Select any folder (beside root) where imported Media will be stored. - Assign imported Media to File Set
This option is helpful, when you are generating Concrete Thumbnails for Images that belong to a specific File Set. - Moderation
You can choose from these two options:
a) Show all Media and choose which to hide
b) Hide all Media and choose which to show - Media limit
How many latest non-deleted Media should be kept in this Media Source.
Warning: Any Media above that number will be automatically deleted (including Files in File Manager) during process of fetching from Instagram API (Dashboard UI and CRON tasks).
Keep empty to disable this option.
Media Sources
"Media Sources" list contains all basic information about them.
Access Tokens for Personal accounts will usually last around 60 days.
Before that time, you have to manually extend it for another 60 days (refresh icon) or use CRON URLs for full automation of this process.
Access tokens can sometimes expire earlier, for example if you change password or Facebook decide to invalidate them for some reason etc.
Access tokens for Business accounts technically never expire, but your permissions granted for app definitely do.
If you don't "have any interaction with an app" within 90 days, your app permissions will be automatically revoked and you will have to connect to app again.
P. S. Since 90 days is a long time required to test it, it will be clarified here later. Also since it's just a web app for generating access tokens, "have any interaction with an app" most likely means that you have manually login and extend app permissions.
Media Source Management
Whole process is divided into two steps:
1. Fetch the latest Media from Instagram API
Fill how many Media you want to fetch, click "Start", wait till all operations end, click "Go back".
You can fetch between 1 and 200 Media at once.
Fetched Media will be saved in database, but you should complete Step 2 relatively soon (since Instagram URLs expire after 48h or so).
Since some Instagram API limits are shared across all users, I have implemented some "safeguards" to prevent temporary blockades of API for all app users. For example, using dashboard UI you can fetch data from API every 300 seconds.
2. Download and Import Media to File Manager
Enter how many Media you want to import to File Manager, click "Start", wait till all operations end, click "Go back".
Media will be automatically inserted into a Folder and assigned to a File Set that you have specified in Settings.
There is no limit how many Media you can fetch, since it is not directly interacting with Instagram API (and only depends on your server capabilities).
After completing both steps, Media will be ready to be displayed in galleries.
Medium actions:
- Disable/enable
Disabled Medium will not be displayed in galleries, will be skipped during Import. - Delete
Deleted Medium will not be displayed in galleries, will be skipped during API fetch and Import.
It will also delete File from File Manager. Click "trash" icon in top bar to be able to restore it/permanently delete it from database. - Sync
Update information about Medium from Instagram API.
CRON Tasks
If you want to automate refreshing token/fetching Media from API/importing to File Manager, you need to have access to CRON on your server. And how you do it, varies from server to server, so it's best to read your server documentation or contact hosting administrators.
CRON URLs are unique for each Media Source, which means you need to set up separate CRON tasks for every Media Source.
Setting these tasks up is optional (since you can conduct all these operations manually using Dashboard UI).
Refresh Access Token
Fresh access token is valid for about 2 months.
Recommended frequency: Twice per month.
Fetch the latest Media from Instagram API
Be aware of Instagram API limits. If you run this CRON Task to often or fetch to much data, you will be throttled/unable to access API data for some time.
This URL fetches on average 10-20 top/recent Media at once.
Since image/video URLs from API are expiring on regular basis, be sure to also run "Download and Import the latest Medium" task regularly.
Recommended frequency: Once per day
Download and Import the latest Medium (which is not disabled, not deleted and not imported yet)
Number of files per Medium varies e.g. Image (1), Video (1-2), Carousel Album (3-21).
This task will not do any API calls and will always download/import one Medium that was fetched from Instagram API earlier.
Recommended frequency: Every 1 hour (though it can be run much more often, it depends how often/how many Media you are fetching from API and your server capabilities).
Adding galleries
When you are done, it's time to add "Insta Media Gallery" block to your page.
Visit link below for more information.