PHPackages                             codechap/i - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. codechap/i

ActiveLibrary

codechap/i
==========

Posts to your Instagram Business account only.

07PHP

Since Sep 19Pushed 8mo agoCompare

[ Source](https://github.com/codeChap/post.i)[ Packagist](https://packagist.org/packages/codechap/i)[ RSS](/packages/codechap-i/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Instagram Business Account Post Library
===========================================

[](#php-instagram-business-account-post-library)

A simple PHP library for posting to Instagram Business Accounts using the Instagram Graph API. This package allows you to post images and create carousel posts to your Instagram Business account.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- cURL extension
- JSON extension
- Facebook App with Instagram permissions
- Instagram Business Account (linked to a Facebook Page)
- Long-lived Facebook Page Access Token (with Instagram permissions)

Setup Requirements
------------------

[](#setup-requirements)

### 1. Instagram Business Account

[](#1-instagram-business-account)

- You must have an Instagram Business Account
- It needs to be linked to a Facebook Page
- Go to [Instagram Business Account Setup](https://business.instagram.com/getting-started) to create/convert

### 2. Facebook App Permissions

[](#2-facebook-app-permissions)

Your access token needs these permissions:

- `pages_show_list`
- `pages_read_engagement`
- `instagram_basic`
- `instagram_content_publish`

Installation
------------

[](#installation)

```
composer require codechap/i
composer require codechap/i @dev
```

Quick Start
-----------

[](#quick-start)

### 1. Setup

[](#1-setup)

Run the setup script to configure your Facebook page and Instagram account:

```
php setup.php
```

This will guide you through:

- Getting an access token from Facebook
- Selecting your Facebook page
- Verifying your Instagram Business Account connection

### 2. Post to Instagram

[](#2-post-to-instagram)

```
