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.

Requirements

Yii 1.1 or above

Usage

  • 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();				
$instagram->openAuthorizationUrl();

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();
    $instagram->setAccessToken($accessToken); 
    $instagramUser = $instagram->getCurrentUser();
    ....

enojoy asking Instagram API's whatever you want

Resources

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

Downloads

show all

Related Extensions