strapi-plugin-instagram

0.1.4 • Public • Published

Strapi plugin instagram

Installation

$ npm i strapi-plugin-instagram

Example or

$ yarn add strapi-plugin-instagram

Configurations

Base config

./config/plugins.js

module.exports = ({ env }) => ({
    instagram: {
        facebookAppClientId: env('INSTAGRAM_APP_CLIENT_ID'),
        facebookAppClientSecret: env('INSTAGRAM_APP_CLIENT_SECRET'),

        // Optionnal - Use `overrideAdminUrl` during development
        // to redirect after instagram login to your local server
        // (take a look at https://ngrok.com/ )
        // ex: 'https://GROK_ID.eu.ngrok.io/admin',
        overrideAdminUrl: null,
    },
});

Cron

After connecting your Instagram account throught the admin, this plugin will fetch your instagram posts with the Instagram basic display API

Add the following cron jobs to trigger associated tasks:

./config/functions/cron.js

// At every 30th minute
'*/30 * * * *': () => {
    strapi.plugins.instagram.services.instagramupdater.default.fetchFeed();
},

// At 00:00
'0 0 * * *': () => {
    strapi.plugins.instagram.services.instagramtokenrefresher.default.refreshToken();
},

Others

You will need to create a Facebook App and provide your informations in the plugin config.

If you need to scrap posts from an Instagram account you don't control, take a look to strapi-plugin-instagram-feed

--

I work on this plugin on my spare time, any help is welcome.

Package Sidebar

Install

npm i strapi-plugin-instagram

Weekly Downloads

6

Version

0.1.4

License

MIT

Unpacked Size

70.6 kB

Total Files

105

Last publish

Collaborators

  • eweap