PHP code example of wallrio / instafeed

1. Go to this page and download the library: Download wallrio/instafeed 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/ */

    

wallrio / instafeed example snippets


use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;
$profile->cache->dir(__DIR__DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);

$profile->username('wallace.rio');
$instaData = $profile->get();


use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;

$profile->username('wallace.rio');
$instaData = $profile->get(function(){
	// code to run if instagram feed has updated
});


	$profile->cache->clear('30m');		// 30 minutes
	$profile->cache->clear('2d');		// 2 days
	$profile->cache->clear('5h');		// 5 hours


use InstaFeed\Profile as Profile;
$profile = new Profile();

$profile->useCache = true;
$profile->cache->dir(__DIR__DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
$profile->cache->clear();

$profile->username('wallace.rio');
$instaData = $profile->get();