PHPackages                             flarone/instagram-graph-api - 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. [API Development](/categories/api)
4. /
5. flarone/instagram-graph-api

ActiveLibrary[API Development](/categories/api)

flarone/instagram-graph-api
===========================

Instagram Graph API PHP package

1.0.3(2y ago)038MITPHPPHP ^5.6|^7.0|^8.0

Since Oct 25Pushed 2y agoCompare

[ Source](https://github.com/flarone/instagram-graph-api)[ Packagist](https://packagist.org/packages/flarone/instagram-graph-api)[ Docs](https://github.com/flarone/instagram-graph-api)[ RSS](/packages/flarone-instagram-graph-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

instagram-graph-api
===================

[](#instagram-graph-api)

This repository contains the open source PHP SDK that allows you to access the Instagram Graph API from your PHP app.

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

[](#installation)

### Composer

[](#composer)

Run this command:

```
composer require flarone/instagram-graph-api

```

Require the autoloader.

```
require_once __DIR__ . '/vendor/autoload.php'; // change path as needed
```

### No Composer

[](#no-composer)

Get the repository

```
git clone git@github.com:flarone/instagram-graph-api.git

```

Require the custom autoloader.

```
require_once '/instagram-graph-api/src/instagram/autoload.php'; // change path as needed
```

Usage
-----

[](#usage)

Simple GET example of a user's profile and media posts.

```
use Instagram\User\BusinessDiscovery;

$config = array( // instantiation config params
    'user_id' => '',
    'username' => '', // string of the Instagram account username to get data on
    'access_token' => '',
);

// instantiate business discovery for a user
$businessDiscovery = new BusinessDiscovery( $config );

// initial business discovery
$userBusinessDiscovery = $businessDiscovery->getSelf();
```

Simple POST example of posting an image to an Instagram account.

```
use Instagram\User\Media;
use Instagram\User\MediaPublish;

$config = array( // instantiation config params
    'user_id' => '',
    'access_token' => '',
);

// instantiate user media
$media = new Media( $config );

$imageContainerParams = array( // container parameters for the image post
    'caption' => '', // caption for the post
    'image_url' => '', // url to the image must be on a public server
);

// create image container
$imageContainer = $media->create( $imageContainerParams );

// get id of the image container
$imageContainerId = $imageContainer['id'];

// instantiate media publish
$mediaPublish = new MediaPublish( $config );

// post our container with its contents to instagram
$publishedPost = $mediaPublish->create( $imageContainerId );
```

Example of a custom request.

```
// first we have to instantiate the core Instagram class with our access token
$instagram = new Instagram\Instagram( array(
    'access_token' => ''
) );

/**
 * Here we are making our request to instagram and specify the endpoint along with our custom params.
 * There is a custom function for get, post, and delete.
 *     $instagram->get()
 *     $instagram->post()
 *     $instagram->delete()
 *
 * Here is the skeleton for the customized call.
 */
$response = $instagram->method( array(
    'endpoint' => '/',
    'params' => array( // query params key/values must match what IG API is expecting for the endpoint
        '' => '',
        '' => '',
        // ...
    )
) );
```

Documentation
-------------

[](#documentation)

See the [Wiki](https://github.com/flarone/instagram-graph-api/wiki) for the complete documentation.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

934d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51fd7905d0acba590e8e161f4c10f91eef023650ec78751bb7885ce4e9664df0?d=identicon)[Flarone](/maintainers/Flarone)

---

Tags

phpapiinstagramgraph-apiinstagram graph api

### Embed Badge

![Health badge](/badges/flarone-instagram-graph-api/health.svg)

```
[![Health](https://phpackages.com/badges/flarone-instagram-graph-api/health.svg)](https://phpackages.com/packages/flarone-instagram-graph-api)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[pgrimaud/instagram-user-feed

This is a scraper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.

940657.1k5](/packages/pgrimaud-instagram-user-feed)[liamcottle/instagram-sdk-php

This is an unofficial SDK for the Instagram Private API in PHP

1308.4k](/packages/liamcottle-instagram-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
