| Package Data | |
|---|---|
| Maintainer Username: | mayoz |
| Maintainer Contact: | srcnckr@gmail.com (Sercan Çakır) |
| Package Create Date: | 2015-09-26 |
| Package Last Update: | 2017-09-01 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-10 03:10:00 |
| Package Statistics | |
|---|---|
| Total Downloads: | 598 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 1 |
| Total Forks: | 1 |
| Total Open Issues: | 0 |
To get started with Instagram, add to your composer.json file as a dependency:
composer require mayoz/instagram
After installing the Instagram library, register the Mayoz\Instagram\InstagramServiceProvider in your config/app.php configuration file:
'providers' => [
// Other service providers...
Mayoz\Instagram\InstagramServiceProvider::class,
],
Also, add the Instagram facade to the aliases array in your app configuration file:
'Instagram' => Mayoz\Instagram\Facades\Instagram::class,
You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/services.php configuration file with instagram key. For example:
'instagram' => [
'client_id' => env('INSTAGRAM_KEY'),
'client_secret' => env('INSTAGRAM_SECRET'),
'redirect' => env('INSTAGRAM_REDIRECT_URI'),
],
Next, you are ready to use. Please see the following examples.
<?php
namespace App\Http\Controllers;
use Instagram;
use Illuminate\Routing\Controller;
class HomeController extends Controller
{
/**
* Get the most popular Instagram medias.
*
* @return Response
*/
public function getPopularMedia()
{
return (array) Instagram::getPopularMedia();
}
}
This package is only bridge for Laravel5. Please check the Instagram PHP-API documents for more details.
THis package is licensed under The MIT License (MIT).