Easy Instagram Photos - Magento 2 module documentation
Author: Aurora Creation
Easy Instagram Photos Module
Module overview
Instagram currently has over 700 million active users and their number is constantly growing. Make your store not indifferent to global trends and connect it to your Instagram account. The Easy Instagram Photos module allows you to add photo and video galleries based on the latest entries from your Instagram account.
Module compatibility
This module is compatibile with Magento Community versions: 2.3 and 2.4.
How it works
After installing the module, go to Stores > Configuration > Aurora > Easy Instagram Photos. The module configuration is divided into 2 tabs:
In the General tab, complete the following fields:
Enable - Enable the module.
Instagram App ID - Instagram App Identifier.
Instagram App Secret - Instagram App secret key.
Api Url - Instagram account URL.
Long-Lived access token - API access token.
Image width - Images width (in pixels).
Image height - Images height (in pixels).
Image count - The number of photos that will be displayed in the widget.
Filter Image Type Only - Download only photos from your Instagram account (video posts will be ignored).
The following options are available in the Refresh tab:
Automatic - Enable automatic access token refresh.
Manually generate long-lived token - Manually refresh the access token.
Instagram App Secret - Manually download the latest photos from your Instagram account (the module automatically downloads data once a day).
In order to get all the data needed for configuration, it is necessary to create a new Instagram Basic Display API application in the Meta for Developers platform.
Instruction available here: https://developers.facebook.com/docs/instagram-basic-display-api.
After completing the configuration, we can use the widget provided by the module. For example, it can be created in Content > Widgets or added using PageBuilder in the content of the CMS block we are interested in.
The widget has only one custom option to configure - the title that will be displayed in the widget block.
The widget after placing it on the home page looks like this:
Installation
Composer
- Add the repository to composer.json:
"repositories": [
...
{
"type": "vcs",
"url": "git@git.auroracreation.com:aurora-modules/easy-instagram-photos.git"
}
...
],
- Then add the dependency in composer.json:
"require": {
...
"aurora/easy-instagram-photos": "*"
...
},
- In the Magento root folder, run the following commands:
composer update aurora/easy-instagram-photos
php bin/magento module:enable Aurora_EasyInstagramPhotos
php bin/magento setup:upgrade
Manual
- Unzip the archive.
- Upload module files on your server to:
{Magento root}
└── app/
└── code
- In the Magento root folder, run the following commands:
php bin/magento module:enable Aurora_EasyInstagramPhotos
php bin/magento setup:upgrade
Changelog
v2.1.3
- Fix buttons for refreshing tokens and photos.
- Add cron group.
- Coding standards fixes.
v2.1.2
- Update GitLab CI/CD.
- Code refactoring - coding standards, type hints.
v2.1.1
- Fix method for checking if a post contains a video.
v2.1.0
- Add option to ignore video posts.
v2.0.6
- Fix refreshing tokens on multistore.
v2.0.5
- Media URL fix.
v2.0.4
- Deleting old photos fix.
v2.0.3
- Support for store views in cron jobs.
v2.0.2
- Assign store view to photos.
v2.0.1
- Photos display fix.
- Gitlab CI/CD fix.
v2.0.0
- Module refactoring.
- Add repository and interfaces.
v1.2.8
- Rename event and observer.
v1.2.7
- Rename photo files.
v1.2.6
- Module name fixes - acl, configuration paths.
v1.2.5
- Delete .gitignore.
v1.2.4
- Gitlab CI/CD fix.
v1.2.2
- No changes.
v1.2.1
- Image URL fix.
v1.2.0
- Saving photos on the server.
- Resize images.
v1.1.4
- Add the rel=”noopener” attribute in the post link tag.
v1.1.3
- Widget template fixes.
v1.1.2
- Module version change.
v1.1.1
- Number of photos limit.
v1.1.0
- API change.
- Support access token generation.
v1.0.2
- Add README.
v1.0.1
- Widget styling.
v1.0.0
- Module init.