hautelook/instagram-bundle

This bundle enables Instagram API support in a Symfony environment.

Installs: 48 368

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 17

Forks: 5

Open Issues: 3

Type:symfony-bundle

dev-master 2014-05-29 16:28 UTC

This package is not auto-updated.

Last update: 2020-07-06 09:44:54 UTC


README

A Symfony2 bundle to work with the Instagram API.

Build Status

Introduction

This bundle provides a new bundle that uses the Instaphp library to leverage the Instagram API.

Installation

Simply run assuming you have installed composer.phar or composer binary (or add to your composer.json and run composer install:

$ composer require hautelook/instagram-bundle

You can follow dev-master, or use a more stable tag (recommended for various reasons). On the Github repository, or on Packagist, you can always find the latest tag.

Now add the Bundle to your Kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Hautelook\InstagramBundle\HautelookInstagramBundle(),
        // ...
    );
}

Configuration

You can configure the bundle by defining:

# app/config/hautelook_instagram.yml

hautelook_instagram:
    instaphp_params:
        client_id: <your client id>
        client_secret: <your client secret>
    user_id: <your user id>

Usage

Simply get the manager service and call getRecent. Example

<?php

namespace Acme\DemoBundle;

class SomeController extends Controller
{
    public function someAction()
    {
        $instagramManager = $this->get('hautelook_instagram.manager');
        $posts = $instagramManager->getRecent(5);
    }
}

Future and ToDos:

  • Clean up
  • Add more functionality