elevencodes/instagram-laravel
Larablocks Analysis
elevencodes/instagram-laravel works with Laravel 4 (latest release 2.0.5, Jun 20, 2014), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 4, past end of life
- No release in the last 12 months (last: Jun 20, 2014)
- 0 downloads a month (needs 10,000)
- 32 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jun 20, 2014.
- No releases in the last 12 months.
- First released: Jun 10, 2013.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require elevencodes/instagram-laravel |
|
| Latest Version: | 2.0.5 |
| PHP: | >=5.3.0 |
| Laravel: | 4 |
| License: | MIT |
| Last Updated: | Jun 20, 2014 |
| Links: | GitHub · Packagist |
Instagram Service Provider for Laravel
A simple Laravel 4 service provider for including the PHP Instagram API.
Installation
The Instagram Service Provider can be installed via Composer 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
To use the Instagram Service Provider, you must register the provider when bootstrapping your Laravel application.
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
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
Get current user
You can use static call to get the current authenticated user.
$user = Instagram::getCurrentUser();
Reference
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.0.5 | >=5.3.0 | >=4.0,<4.3 | MIT | |
| 2.0.4 | >=5.3.0 | >=4.0,<4.2 | MIT | |
| 2.0.3 | >=5.3.0 | 4.1.x | MIT | |
| 2.0.2 | >=5.3.0 | 4.1.x | MIT | |
| 2.0.1 | >=5.3.0 | 4.1.x | MIT | |
| 2.0.0 | >=5.3.0 | 4.1.x | MIT | |
| 1.0.1 | >=5.3.0 | 4.0.x | MIT | |
| 1.0.0 | >=5.3.0 | 4.0.x | MIT |


