PHPackages                             socialconnect/instagram - 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. socialconnect/instagram

ActiveLibrary[API Development](/categories/api)

socialconnect/instagram
=======================

Awesome SDK to work with Instagram social network

0.1(10y ago)16331MITPHPPHP &gt;=5.4

Since Jul 9Pushed 10y ago5 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

[![](https://camo.githubusercontent.com/48a37084c3c5c05b3c210d60daaa94470e4a96e2630d08d98e687efe0586bf24/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f496e7374616772616d2e706e67)](https://camo.githubusercontent.com/48a37084c3c5c05b3c210d60daaa94470e4a96e2630d08d98e687efe0586bf24/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f496e7374616772616d2e706e67) Instagram SDK
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-instagram-sdk)

[![Build Status](https://camo.githubusercontent.com/031c0e43a1f603caa4d3ec330f9d80d656914957bce0741a783e48581cc1a58c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f696e7374616772616d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/instagram/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a9179c1bb2666454c6b898421499994dd664e60274c54ca1ef8ab57f63cdfa52/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f696e7374616772616d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/instagram/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/95f6c40892e6aa53f8d0097740118a51d55fa9fcc25bd360e1420852e69e3bb9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f696e7374616772616d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/instagram/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/37260700bd323cc49cf26fa06cac55c9178818a0594b6886fe6cdc3e39729cf1/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c636f6e6e6563742f696e7374616772616d2f762f737461626c652e737667)](https://packagist.org/packages/socialconnect/instagram)[![License](https://camo.githubusercontent.com/aac7b1865cd28be2cd7dd88de87233f97754c6093933c528b864fe24469b9b5f/68747470733a2f2f706f7365722e707567782e6f72672f536f6369616c436f6e6e6563742f696e7374616772616d2f6c6963656e73652e737667)](https://packagist.org/packages/socialconnect/instagram)

> Awesome SDK to work with Instagram social network

Available methods:

- searchUser
- getUser
- getUserFeed
- getUserMediaRecent
- getUserMediaLiked
- getMediaLikes
- removeMediaLike
- getUserFollows
- getUserFollowedBy
- getMedia
- getMediaPopular

Authentication
--------------

[](#authentication)

This library is SDK, see OAuth provider in [socialconnect/auth](https://github.com/socialconnect/auth) project.

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

[](#installation)

Add a requirement to your `composer.json`:

```
{
    "require": {
        "socialconnect/instagram": "~0.1"
    }
}
```

Run the composer installer:

```
php composer.phar install
```

How to use
----------

[](#how-to-use)

First you need to create service:

```
// Your Instagram Application's settings
$appId = 'appId';
$appSecret = 'secret';

$instagramClient = new \SocialConnect\Instagram\Client($appId, $appSecret);
$instagramClient->setHttpClient(new \SocialConnect\Common\Http\Client\Curl());
```

Get user with specified $id:
----------------------------

[](#get-user-with-specified-id)

```
$instagramClient = $instagramClient->getUser(715473058);
var_dump($user);
```

Get self information:
---------------------

[](#get-self-information)

```
$instagramClient = $instagramClient->getUser();
var_dump($user);
```

Customs methods
---------------

[](#customs-methods)

```
$parameters = [];
$result = $instagramClient->request('method/CustomMethod', $parameters);
if ($result) {
    var_dump($result);
}
```

Custom entities
---------------

[](#custom-entities)

```
class MyUserEntitiy extends \SocialConnect\Instagram\Entity\User {
    public function myOwnMethod()
    {
        //do something
    }
}

$instagramClient->getEntityUser(new MyUserEntitiy());
$user = $instagramClient->getUser(1);

if ($user) {
    $instagramClient->myOwnMethod();
}
```

License
-------

[](#license)

This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

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

Unknown

Total

1

Last Release

3967d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c019ea1f0133ad14d256163bc4d25a428b15f08083b15fdd380dc215e0e26177?d=identicon)[ovr](/maintainers/ovr)

---

Top Contributors

[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (52 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

instagraminstagram-apiinstagram-clientinstagram-sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/socialconnect-instagram/health.svg)

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

92437.3k6](/packages/botman-driver-telegram)

PHPackages © 2026

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