mrfabri/instafeed

Laravel package to list Instagram posts via Meta Graph API

Maintainers

Package info

github.com/MrFabri/instafeed

pkg:composer/mrfabri/instafeed

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-17 19:46 UTC

This package is auto-updated.

Last update: 2026-06-17 19:54:03 UTC


README

A Laravel package to list Instagram posts via the Meta Instagram Graph API.

Installation

composer require mrfabri/instafeed

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=instafeed-config

Add the following variables to your .env:

INSTAFEED_CLIENT_ID=your_facebook_app_id
INSTAFEED_CLIENT_SECRET=your_facebook_app_secret
INSTAFEED_ACCESS_TOKEN=your_long_lived_access_token
INSTAFEED_IG_USER_ID=your_instagram_business_user_id
INSTAFEED_CACHE_ENABLED=true
INSTAFEED_CACHE_TTL=3600

Usage

List all posts

use MrFabri\Instafeed\Facades\Instafeed;

$posts = Instafeed::all();

foreach ($posts as $post) {
    echo $post->caption;
    echo $post->mediaUrl;
}

Find a specific post

$post = Instafeed::find('post_id');

Limit results

$posts = Instafeed::limit(10);

Filter by date

$posts = Instafeed::since('2026-01-01');

Media only (excludes stories)

$posts = Instafeed::media();

Check Token Command

Verify that your access token is still valid:

php artisan instafeed:check-token

Quiet mode (returns exit codes only):

php artisan instafeed:check-token --quiet

Requirements

  • PHP 8.2+
  • Laravel 11+
  • Instagram Business or Creator account
  • Meta app with Instagram Graph API enabled

License

MIT