PHPackages                             bda-matt/laravel-instagram-feed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bda-matt/laravel-instagram-feed

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bda-matt/laravel-instagram-feed
===============================

This is a fork of - https://github.com/Dymantic/laravel-instagram-feed - with timestamps

v3.2.5(5y ago)067MITPHP

Since Apr 20Pushed 5y agoCompare

[ Source](https://github.com/BDA-Matt/laravel-instagram-feed)[ Packagist](https://packagist.org/packages/bda-matt/laravel-instagram-feed)[ RSS](/packages/bda-matt-laravel-instagram-feed/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (22)Used By (0)

Laravel Instagram Feed
======================

[](#laravel-instagram-feed)

[![Build Status](https://camo.githubusercontent.com/335f353ee8d484776392ee406458e1c53b391e651d4c3a53367a08dea595f2fc/68747470733a2f2f7472617669732d63692e6f72672f44796d616e7469632f6c61726176656c2d696e7374616772616d2d666565642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Dymantic/laravel-instagram-feed)

Easily include your Instagram feed(s) in your project.
------------------------------------------------------

[](#easily-include-your-instagram-feeds-in-your-project)

The aim of this package is to make it as simple and user-friendly as possible to include your Instagram feed in your project, using Instagram's Basic Display API. The package is made so that ideally the view is almost always just using cached data, and the feed itself will be updated at a schedule of your choosing, using Laravel's great scheduling features. The feed is also designed to be resilient, so that you can safely call it from your controllers without having to worry about network errors breaking the page.

### Installation

[](#installation)

```
composer require BDA-Matt/laravel-instagram-feed

```

**Note** You will need to use ^v2.0, as v1 used the old Legacy API which has been shut down.

**Breaking changes from v1:** The feed now consists of entries that only contain the media type, media url, caption, id and permalink. Additionally, when completing the auth flow, the token no longer contains the users full name or avatar as the Basic Display API doesn't provide this. I am open to the idea of separately scraping for that data, but not planning on doing it right now. You will also need to refresh your tokens, which expire every 60 days. See further down for more on that.

Tutorial
--------

[](#tutorial)

Some parts of this whole thing can be a bit confusing, especially if you are not familiar with following the OAuth flow. I have included [a tutorial](tutorial.md) to try help make things a bit more clear. Feedback or improvements on this would be most appreciated.

### Before you start

[](#before-you-start)

To use the Instagram Basic Display API, you will need to have a Facebook app set up with the correct permissions, etc. If you don't have this yet, head over to [the Facebook developer docs](https://developers.facebook.com/docs/instagram-basic-display-api/getting-started) and follow the instructions.

### How Instagram Media is Handled

[](#how-instagram-media-is-handled)

Instagram provides three media types through this API: image, video and carousel. This package simplifies that into just a feed of images and videos. You may use the `ignore_video` config option if you don't want to include any videos. For carousel items, the first item of the carousel is used. If video is to be ignored, and the first image will be used, if it exists.

### Setup

[](#setup)

`php artisan vendor:publish` to publish the necessary migrations and config, and `php artisan migrate` to run migrations.

### Config

[](#config)

Publishing the vendor assets as described above will give you a `config/instagram-feed.php` file. You will need to add your config before you can get started. The comments in the file explain each of the settings.

```
// config/instagram-feed.php
