Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
UNOfficial PHP Instagram API implementation
branch: master
Failed to load latest commit information.
curl @ 5dc0822 curl
.gitmodules Curl submodule RO Update
callback.php Removed secret
composer.json fix name
phpirt.php Update phpirt.php
test.php Readme


PHP Instagram implementation


This an in ultra-alpha library, but it works. It's just a piece of code I've created to play along with the Instagram Real Time API

Required libraries

You'll need to have the curl library installed along with PHP.

We also use curl library from shuber

If you git clone --recursive everyhing should be working fine

How to use the REAL TIME API

You will need an instagram client id and client secret. Get it here.

In order to use this library you will need to set it somewhere where the callback.php file can be accessible by instagram servers

test.php file has an example on usage for the basic subscriptions calls

To configure the callback usage you must create a new class extending SubscriptionProcessor in phpirt.php file and redefine the public static function process($data){} function. You can see an example at callback.php file


$i = new InstagramRealTime(INSTAGRAM_KEY, INSTAGRAM_SECRET);
$photos = $i->generic("/tags/$hashtag/media/recent");
Something went wrong with that request. Please try again.