Skip to content

An easy-to-use and simple Instagram package

License

Notifications You must be signed in to change notification settings

mserralta/instagram

 
 

Repository files navigation

Instagram

instagram

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');

Build Status StyleCI Coverage Status Latest Version License

Installation

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

Usage

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.

License

MIT © Vincent Klaiber

About

An easy-to-use and simple Instagram package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%