PHPackages                             jaykay-design/cakephp-my-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. [API Development](/categories/api)
4. /
5. jaykay-design/cakephp-my-instagram-feed

ActiveCakephp-plugin[API Development](/categories/api)

jaykay-design/cakephp-my-instagram-feed
=======================================

CakePHP3.x Instagram feed Plugin

01PHP

Since Feb 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jaykay-design/cakephp-my-instagram-feed)[ Packagist](https://packagist.org/packages/jaykay-design/cakephp-my-instagram-feed)[ RSS](/packages/jaykay-design-cakephp-my-instagram-feed/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Instagram feed plugin for CakePHP 3.x
=====================================

[](#instagram-feed-plugin-for-cakephp-3x)

Show your own Instagram feed in CakePHP

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Preparation](#preparation)
- [Configuration](#configuration)
- [Usage](#basic-usage)
- [Bugs and Feedback](#bugs-and-feedback)
- [License](#license)

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

Run the following command

```
composer require jaykay-design/cakephp-my-instagram-feed
```

You can then load the plugin using the shell command:

```
bin/cake plugin load -b MyInstagramFeed
```

Or you can manually add the loading statement in the **config/boostrap.php** file of your application:

```
Plugin::load('MyInstagramFeed', ['routes' => true]);
```

or in CakePHP &gt;= 3.8 add this statement in the **src/Application.php** file of your application

```
public function bootstrap()
    {
        ...
        $this->addPlugin(\MyInstagramFeed\Plugin::class, ['routes' => true]);
        ...
```

Add the view helper in **src/View/AppView.php**

```
public function initialize()
{

    ...
    $this->loadHelper('MyInstagramFeed.MyInstagramFeed');
    ...
```

Preparation
-----------

[](#preparation)

To be able to get your Instagram feed data you will have to provide a client ID and client secret. These can be obtained by creating a Facebook App for Instagram. Follow these [instructions](https://developers.facebook.com/docs/instagram-basic-display-api/getting-started).

When asked to provide an OAuth callback url enter this: \[Your domain\]/MyInstagramFeed/OAuth/authorize

Configuration
-------------

[](#configuration)

Default configuration:

```
'MyInstagramFeed' => [
    'client_id' => '',
    'client_secret' => '',
    'cache_config' => 'default'
],
```

- client\_id (string) - The client id provided to you when you [set up](#setup) the app
- client\_secret (string) - The client secret provided to you when you [set up](#setup) the app
- cache\_config - The cache configuration for the instagram feed data

Basic Usage
-----------

[](#basic-usage)

Typically you define these keys in your **config/app.php** file:

```
'MyInstagramFeed' => [
    'client_id' => 'some large number',
    'client_secret' => 'a very large string',
    'cache_config' => 'default'
],
```

Once you have Installed and configured the plugin visit this page of your site: \[your domain\]/MyInstagramFeed/OAuth and you will be shown a link named "Authorize". After you click on it you will be asked if this app is allowed to access your Instagram feed. Agree to all options.

In your template where you want to show your Instagram feed add this code:

```
