STS Instagram Feed
Fetches Instagram Business posts through the Facebook Graph API with automatic token refresh, for WordPress themes.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/shaybenishay/sts-instagram/archive/refs/heads/main.zipFetches your Instagram Business posts through the Facebook Graph API, refreshes the access token automatically, and exposes a PHP function for your theme. It does not output any markup itself.
Usage
$posts = sts_fetch_instagram_posts( 6 ); // up to 6 latest posts
Render the result in your theme as you like.
Setup
- Create a Facebook App and an Instagram Business account linked to a Facebook Page.
- Open Settings > Instagram API and enter the Instagram Business ID, an access token (with
instagram_basicandinstagram_manage_insights), and the Facebook App ID and App Secret. - With the App ID and Secret set, a daily cron job refreshes the token before it expires.
Admin hints are in Hebrew.
Requirements
WordPress 5.0+, PHP 7.4+. WooCommerce is not needed.
Security note
The token and app secret are stored in the WordPress options table. Treat database access accordingly.
Status
Version 1.0.0. Provided as-is, under GPL-2.0-or-later (see LICENSE).
Setup, customization and support are available from Shay Tech Solutions.