InstagramBundle
A Symfony2 bundle to work with the Instagram API.
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-bundleYou 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
