roketin/instagram

An easy-to-use and simple Instagram package

8.0.0 2018-10-04 03:24 UTC

This package is auto-updated.

Last update: 2024-11-04 22:56:46 UTC


README

instagram

An easy-to-use and simple Instagram package.

use Roketin\Instagram\Instagram;

// Create a new instagram instance.
$instagram = new Instagram('access_token');

// Fetch the user's recent media feed.
$instagram->get();

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 roketin/instagram php-http/message php-http/guzzle6-adapter

Usage

First you need to create a new roketin\Instagram\Instagram instance and add your access token. If you don't want to create a Instagram API application you can use Pixel Union's access token generator for Instagram.

use Roketin\Instagram\Instagram;

$instagram = new Instagram('access_token');

To fetch the user's recent media data you may use the get() method.

$instagram->get();

Note: You can only fetch recent media from the given user's access token.

License

MIT © Vincent Klaiber