An easy-to-use and simple Instagram package.
use Vinkla\Instagram\Instagram;
// Create a new instagram instance.
$instagram = new Instagram();
// Fetch the media feed.
$instagram->get('jerryseinfeld');
Instagram is decoupled from any library sending HTTP requests (like Guzzle), instead it uses an abstraction called HTTPlug which provides the http layer used to send requests to exchange rate services. This gives you the flexibility to choose what HTTP client and PSR-7 implementation you want to use.
Read more about the benefits of this and about what different HTTP clients you may use in the HTTPlug documentation. Below is an example using Guzzle 6:
$ composer require vinkla/instagram php-http/message php-http/guzzle6-adapter
First you need to create a new Vinkla\Instagram\Instagram
instance.
use Vinkla\Instagram\Instagram;
$instagram = new Instagram();
To fetch the Instagram media data you may use the get()
method.
$instagram->get('jerryseinfeld');
Note: This will only work with public Instagram accounts.
To preview the JSON data you can visit the page in your browser.