ReactSmith Instagram Feed self-updates
A robust and secure WordPress plugin to retrieve and display Instagram posts, specifically designed for the ReactSmith theme.
by Rossano Guenci · github.com/rossanoguenci/rs-instagram-feed · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/rossanoguenci/rs-instagram-feed/archive/refs/heads/main.zipShips its own WordPress updater (Plugin Update Checker), so new versions show up under Dashboard → Updates.
A robust and secure WordPress plugin to retrieve and display Instagram posts, specifically designed for the ReactSmith theme.
Features
- Secure OAuth Integration: Connect your Instagram Business account easily using the Meta Graph API.
- Automated Synchronisation: Hourly cron jobs to keep your feed up to date automatically.
- Credential Encryption: API secrets are encrypted using AES-256-CBC with a key defined in your
wp-config.php. - Theme-Integrated Components: Seamless integration with the ReactSmith theme's component architecture.
- Performance Optimised: Weekly automated clean-up of old posts to maintain a lean database.
- Onboarding Workflow: Streamlined setup process for easy configuration.
Requirements
- WordPress: 6.0 or higher.
- PHP: 8.0 or higher.
- Theme: ReactSmith Theme (must be active).
- Plugins: Smart Custom Fields (SCF) or Advanced Custom Fields (ACF).
Installation
- Upload the
rs-instagram-feedfolder to the/wp-content/plugins/directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Critical Step: You MUST define a secure encryption key in your
wp-config.phpfile to encrypt your Meta API credentials:
/** Encryption key for ReactSmith Instagram Feed */
define('RS_SECRET_ENCRYPTION_KEY', 'your-random-high-entropy-string-here');
Note: For maximum security, you can use a base64-encoded 32-byte key prefixed with base64:. If a raw string is provided, it will be automatically hashed (SHA-256) to 32 bytes.
Configuration
- Navigate to Instagram Feed in the WordPress admin menu.
- If you haven't set the
RS_SECRET_ENCRYPTION_KEY, you will be prompted with instructions on how to do so. - Go to Account Connection and enter your Meta App ID and Meta App Secret.
- Click Connect with Meta to authorise your Instagram Business account.
- Once connected, you can configure the maximum number of posts and sync settings in the Settings tab.
Development
To set up the development environment:
-
Clone the repository into your WordPress plugins directory.
-
Install dependencies:
composer install pnpm install -
Run tests:
# Run all tests pnpm test # Run unit tests only pnpm test:unit
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Rossano Guenci