mrfabri/instafeed
Composer 安装命令:
composer require mrfabri/instafeed
包简介
Laravel package to list Instagram posts via Meta Graph API
README 文档
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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-17