PHP code example of cnrp / laravel-instagram-feed

1. Go to this page and download the library: Download cnrp/laravel-instagram-feed library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cnrp / laravel-instagram-feed example snippets




return [
    'client_id' => env('INSTA_CLIENT'),
    'client_secret' => env('INSTA_SECRET'),
    'redirect_uri' => env('INSTAGRAM_REDIRECT_URI', 'auth/instagram/callback'),
    'debug' => [
        'log_info' => env('INSTAGRAM_FEED_LOG_INFO', true),
        'log_errors' => env('INSTAGRAM_FEED_LOG_ERRORS', true),
    ],
];

use CNRP\InstagramFeed\Facades\InstagramFeed;

// Get a profile
$profile = \CNRP\InstagramFeed\Models\InstagramProfile::find($profileId);

// Refresh the feed for a profile
InstagramFeed::refreshFeed($profile);

// Get the feed for a profile
$feed = InstagramFeed::getFeed($profile);
bash
php artisan vendor:publish --tag="instagram-feed-config"