yiinstagram Bring the Instagram's experience on your Yii powered webapp

  1. Requirements
  2. Usage
  3. Resources

A simple client that let's you connect and integrate your application with Instagram and make every API call. Your users will be able to connect and login to your site using their Instagram. Built over the very nice (and complete) Instagram PHP Implementation API by Mauricio Cuenca.


Yii 1.1 or above


  • Copy the extension content in your extension/yiinstagram folder
  • Create your Instagram App on http://instagr.am/developer/clients/manage/
  • Add the configuration of your client in the Component section of your config file
'instagram' => array(
   'class' => 'ext.yiinstagram.InstagramEngine',
   'config' => array (
                 'client_id' => 'YOUR_CLIENT_ID',
                 'client_secret'   => 'YOUR_CLIENT_SECRET',
                 'grant_type' => 'authorization_code',
                 'redirect_uri' => 'YOUR_CALLBACK_URL',

start the authentication in your desired controller/action simply doin this:

$instagram = Yii::app()->instagram->getInstagramApp();				

then in your callback url verifiy if the user has been redirect with the code parameter set

if (isset($_GET['code'])) {
    $session = Yii::app()->getSession();
    $accessToken = $instagram->getAccessToken();
    $instagramUser = $instagram->getCurrentUser();

enojoy asking Instagram API's whatever you want


1 0
Yii Version: 1.1
License: GPL-3.0
Category: Web Service
Developed by: Giuliano
Created on: Jun 2, 2012
Last updated: 11 years ago


show all

Related Extensions