PHPackages                             elevencodes/instagram-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. elevencodes/instagram-laravel

ActiveLibrary

elevencodes/instagram-laravel
=============================

Instagram Service Provider for Laravel 4

2.0.5(11y ago)328.4k4[1 issues](https://github.com/fortybytes/instagram-laravel/issues)MITPHPPHP &gt;=5.3.0

Since Jun 10Pushed 11y ago2 watchersCompare

[ Source](https://github.com/fortybytes/instagram-laravel)[ Packagist](https://packagist.org/packages/elevencodes/instagram-laravel)[ RSS](/packages/elevencodes-instagram-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Instagram Service Provider for Laravel
======================================

[](#instagram-service-provider-for-laravel)

[![Build Status](https://camo.githubusercontent.com/05feaf7d357ef3dbc013f75c8a1bec0cd46be0062a62632a3f68be40ed4f1a46/68747470733a2f2f7472617669732d63692e6f72672f666f72747962797465732f696e7374616772616d2d6c61726176656c2e7376673f6272616e63683d322e302e33)](https://travis-ci.org/fortybytes/instagram-laravel) [![Coverage Status](https://camo.githubusercontent.com/03a4cd3aebd5ba20f066f76007e3495200e60f2b5d755a7270aa8ed227c20ecf/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656c6576656e636f6465732f696e7374616772616d2d6c61726176656c2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/elevencodes/instagram-laravel?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/ae916cea6ac6e534a797dcf3622df1ae4bf33d90e99765ffb28a9b8f3c34cbcd/68747470733a2f2f706f7365722e707567782e6f72672f656c6576656e636f6465732f696e7374616772616d2d6c61726176656c2f762f737461626c652e706e67)](https://packagist.org/packages/elevencodes/instagram-laravel) [![Total Downloads](https://camo.githubusercontent.com/0cee530ffdcca37f2d121780c3ff52ab2691817dd88ad26aa7be74b6f864214f/68747470733a2f2f706f7365722e707567782e6f72672f656c6576656e636f6465732f696e7374616772616d2d6c61726176656c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/elevencodes/instagram-laravel)

A simple [Laravel 4](http://laravel.com) service provider for including the [PHP Instagram API](https://github.com/galen/PHP-Instagram-API).

Installation
------------

[](#installation)

The Instagram Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `elevencodes/instagram-laravel` package.

```
{
	"require": {
		"laravel/framework": "4.1.*",
		"php-instagram-api/php-instagram-api": "dev-master",
        "elevencodes/instagram-laravel": "2.0.*@dev"
	}
}
```

> If you are using the Laravel 4.0, use `"elevencodes/instagram-laravel": "1.*"` instead.

Usage
-----

[](#usage)

To use the Instagram Service Provider, you must register the provider when bootstrapping your Laravel application.

### Use Laravel Configuration

[](#use-laravel-configuration)

Run `config:publish` artisan command and update the package configuration file.

```
php artisan config:publish elevencodes/instagram-laravel
```

Find the `providers` key in `app/config/app.php` and register the Instagram Service Provider.

```
    'providers' => array(
        // ...
        'Elevencodes\InstagramLaravel\InstagramLaravelServiceProvider',
    )
```

Find the `aliases` key in `app/config/app.php` and add in our `Instagram` alias.

```
    'aliases' => array(
        // ...
        'Instagram' 	  => 'Elevencodes\InstagramLaravel\Facades\InstagramLaravel',
    )
```

### Authentication

[](#authentication)

The following example uses the Instagram Service Provider to authenticate user.

Add the following methods in your Users Controller.

```
	public function getLogin()
	{
		if (Session::has(Config::get('instagram::session_name')))
			Session::forget(Config::get('instagram::session_name'));

		Instagram::authorize();
	}

	public function getAuthorize()
	{
		Session::put(Config::get('instagram::session_name'), Instagram::getAccessToken(Input::get('code')));

		return Redirect::to('/');
	}

	public function getLogout()
	{
		Session::forget(Config::get('instagram::session_name'));

		return Redirect::to('/');
	}
```

Add the following routes in your `routes.php`.

```
Route::get('/users/authorize', array('as' => 'authorize', 'uses' => 'UsersController@getAuthorize'));
Route::get('/login', array('as' => 'login', 'uses' => 'UsersController@getLogin'));
Route::get('/logout', array('as' => 'logout', 'uses' => 'UsersController@getLogout'));
```

Example
-------

[](#example)

### Get current user

[](#get-current-user)

You can use static call to get the current authenticated user.

```
$user = Instagram::getCurrentUser();
```

Reference
---------

[](#reference)

- [PHP Instagram API](https://github.com/galen/PHP-Instagram-API)
- [Laravel website](http://laravel.com)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Total

9

Last Release

4344d ago

Major Versions

1.0.1 → 2.0.02013-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/f21babe3ad0cbf3075b8dc0d47dfaf07dbe5e99cafb255cf71fa43d2df1c0355?d=identicon)[sumardi](/maintainers/sumardi)

---

Top Contributors

[![sumardi](https://avatars.githubusercontent.com/u/315603?v=4)](https://github.com/sumardi "sumardi (24 commits)")[![shaunchurch](https://avatars.githubusercontent.com/u/571764?v=4)](https://github.com/shaunchurch "shaunchurch (2 commits)")

---

Tags

laravelinstagramLaravel 4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elevencodes-instagram-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/elevencodes-instagram-laravel/health.svg)](https://phpackages.com/packages/elevencodes-instagram-laravel)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
