PHPackages                             in2code/instagram - 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. [Image &amp; Media](/categories/media)
4. /
5. in2code/instagram

ActiveTypo3-cms-extension[Image &amp; Media](/categories/media)

in2code/instagram
=================

Show images and posts from instagram profiles

13.0.1(9mo ago)2341.4k↓36.8%17[13 issues](https://github.com/in2code-de/instagram/issues)[7 PRs](https://github.com/in2code-de/instagram/pulls)GPL-2.0-or-laterPHPPHP ^8.0

Since Apr 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/in2code-de/instagram)[ Packagist](https://packagist.org/packages/in2code/instagram)[ Docs](https://github.com/in2code-de/instagram)[ RSS](/packages/in2code-instagram/feed)WikiDiscussions typo3-13 Synced 1mo ago

READMEChangelogDependencies (11)Versions (33)Used By (0)

Show a profile Instagram feed in TYPO3
======================================

[](#show-a-profile-instagram-feed-in-typo3)

Introduction
------------

[](#introduction)

In the past we did a lot of research to bypass the original Instagram API. Using the official interface is still pain. Now version 6 of this extension respects that Instagram updated their website (some days ago) again and cover it against image grapping. So, we decided now to use the official API in this extension to still deliver images on our website. Nevertheless we want to make the configuration as easy as possible even if there is some hard stuff for non-developers now. Version 6 has some breaking changes because of the switch to the API now (see details below).

Explanation
-----------

[](#explanation)

This extension is splitted into two parts. A scheduler where you can import an instagram feed into the database on the one hand and on the other hand there is a plugin where you can show the feed on your page. The split gives us the possibility to still show images even if the interface is broken and in addition there are no speed limitations with this kind of architecture. Because of the guidelines of Instagram/Facebook the first step to use the API must be done by yourself and by hand. You have to add a facebook developer account and add a new "app". After that you have to get the token by yourself in a browser. Once you have did this, the token can be refreshed automatically. So you do not have to make the whole initialization again. See details below.

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

[](#installation)

`composer require in2code/instagram`

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

[](#configuration)

### The facebook and instagram part

[](#the-facebook-and-instagram-part)

Note

- The Instagram API is only available for Instagram Business accounts. If you have a private account, you have to switch to a business account first.
- The Instagram account you want to access needs to be part of a developer Facebook account as well, otherwise it can't be added as tester to an application.

1. You need a individual Facebook account
2. Once you have a Facebook account, register as a developer at
3. Add a new application.
4. Configure the integration ["Instagram API with Instagram Login"](https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/)
    - Configure "Instagram Business Login". As a OAuth Redirect URL just use the URL of your homepage (e.g. )
    - Make some notes for your new "App ID", "App secret" and the "Redirect URI" - this will be needed later in the FlexForm
5. Under "Roles" add your Instagram account as a test account. *(see notes above)*
    - You need to accept this on your Instagram account. Go to your Instagram account settings and then to "Apps and Websites" and add the new app as a tester.
6. Install the extension (if not yet done)
7. Add a Instagram plugin anywhere on your pages and open the edit view. Add "username", "App ID", "App secret" and "App return URL" and press "save"
8. Now you will see a button at the end of the FlexForm. Click on it and a new browser window is opened with the Instagram website. You have to login and accept the request. After that, you will be redirected to your homepage.
9. If you reload the plugin, you will see a green message that tells you that you now have a valid token and how long the token is valid (no worries, once you have created it, you can use a scheduler task to refresh it automatically)
10. Now, you have access to the API and you can add a new scheduler task and import images from the given user (You should frequently import the feed - e.g. every 30 minutes)
11. Once you have imported the images via scheduler, you can see the plugin output in the frontend with the given feed
12. Don't forget to add an additional scheduler task to frequently refresh the token validation after 30-50 days, because the long-live token in Instagram expires after 60 days.

### CLI commands

[](#cli-commands)

#### Import images

[](#import-images)

If you have access to the instagram API (look at the FlexForm in the plugin and watch for the green message), you can import images via CLI or scheduler.

Import the latest 25 posts from `in2code.de`:

`./vendor/bin/typo3 instagram:importfeed in2code.de`

Import some posts and get notified if error happens via Email:

`./vendor/bin/typo3 instagram:importfeed in2code.de service@in2code.de`:

#### Refresh tokens

[](#refresh-tokens)

Because long-live-tokens are only valid for 60 days, you can automatically refresh them after some days - with:

`./vendor/bin/typo3 instagram:refreshtoken in2code.de`

#### Remove all tokens

[](#remove-all-tokens)

If you change your instagram password, all generated tokens are not useable any more. You have to add new ones. But first of all, you can delete them:

`./vendor/bin/typo3 instagram:removetokens`

### Scheduler

[](#scheduler)

#### Import images

[](#import-images-1)

Add a new scheduler task of type `Execute console commands (scheduler)` and select `instagram:importfeed`. Now you can add a frequency (e.g. `*/30 * * * *` for every 30 minutes), a instagram username and one (or more) email address if error happens (and you want get notified).

[![Scheduler task](Documentation/Images/scheduler.png "Scheduler task")](Documentation/Images/scheduler.png)

FieldDescriptionusernameEvery task can import current posts from one user. If you want to show more feeds, you have to add more tasks.receiversOptional: Get notified via email if a CURL error occurs (e.g. if instagram blocks your requests). Commaseparated email list is provided.#### Refresh tokens

[](#refresh-tokens-1)

There is a new scheduler task, that can be used to automatically refresh Instagram tokens. We would do this after 30-50 days because a long-live token is valid for only 60 days.

Add a new scheduler task of type `Execute console commands (scheduler)` and select `instagram:refreshtoken`. Now you can add a frequency (e.g. `0 5 */30 * ` for every 30 days at 5 am) and a instagram username.

### HTML output modification

[](#html-output-modification)

Overwrite and modify the HTML output:

```
plugin {
    tx_instagram_pi1 {
        view {
            templateRootPaths {
                0 = EXT:instagram/Resources/Private/Templates/
            }
        }
    }
}

```

Example html:

```

									If image is not available on the local machine (for any reasons), load from instagram directly

						{image.caption}

```

### Styling

[](#styling)

If you want to have basic styling for the default layout present in the extension, you can include the static template "Instagram" on your page.

Screenshots
-----------

[](#screenshots)

### Example frontend output:

[](#example-frontend-output)

[![Images from the instagram feed](Documentation/Images/frontend.png "Images from the instagram feed")](Documentation/Images/frontend.png)

### Plugin in backend:

[](#plugin-in-backend)

[![Plugin Flexform](Documentation/Images/backend.png "Plugin Flexform")](Documentation/Images/backend.png)

### Plugin overview in backend page module:

[](#plugin-overview-in-backend-page-module)

[![Plugin preview](Documentation/Images/backend-preview.png "Plugin preview")](Documentation/Images/backend-preview.png)

Technical corner
----------------

[](#technical-corner)

How to use the facebook/instagram API in general and how to test it? See documentation: [ApiDocumentation](Documentation/InstagramApi.md)

FAQ
---

[](#faq)

### Q: The configuration in Instagram sounds complicated

[](#q-the-configuration-in-instagram-sounds-complicated)

A: Yes, we did a lot in the past to give you a gdpr proved and quick to install solution to show your instagram images on your website. Now Instagram updated their websites again, to block "easy" image grabbing. At the moment we do not see a simpler way then described above and also respect privacy for your visitors.

### Q: I clicked the button in the FlexForm and accepted but after that an error is shown

[](#q-i-clicked-the-button-in-the-flexform-and-accepted-but-after-that-an-error-is-shown)

A: Instagram redirect you back to the configured url. If this is (e.g.) your startpage a PSR-15 middleware is listening for GET params like `&code=foo`. This param is given from Instagram (not from us).

### Q: There is no (e.g. german) translation of the plugin

[](#q-there-is-no-eg-german-translation-of-the-plugin)

A: Yes, at the moment we focussed on english to speed up developing.

### Q: Token is only valid for 60 days. Do I have to refresh it manually?

[](#q-token-is-only-valid-for-60-days-do-i-have-to-refresh-it-manually)

A: No, if there is a valid token, you can refresh it (e.g.) after 30 days automatically via another scheduler task.

### Q: Error "OAuthException: Insufficient developer role Code: 400" comes up after clicking the button?

[](#q-error-oauthexception-insufficient-developer-role-code-400-comes-up-after-clicking-the-button)

A: Take care that you are logged in into facebook with your developer account at the same time

### Q: How to add a GDPR-known button in frontend for the visitors?

[](#q-how-to-add-a-gdpr-known-button-in-frontend-for-the-visitors)

A: No worries, this extension is absolutely GDPR-friendly. Text and images are stored anonymized on the server. No button needed for this.

### Q: Can I access to any instagram account?

[](#q-can-i-access-to-any-instagram-account)

A: No, because Instagram wants you to enable the access to the account, the owner has to accept this.

### Q: Is an approvement needed when building a Facebook app?

[](#q-is-an-approvement-needed-when-building-a-facebook-app)

A: No, an approvement from Facebook is not needed.

### Q: Instagram password was changed - now I can't update the feed.

[](#q-instagram-password-was-changed---now-i-cant-update-the-feed)

A: If you change the instagram password, all tokens are not valid any more. An error comes up like

```
{"error":{"message":"Error validating access token: The session has been invalidated because the user changed their pass (truncated...)

```

In this case you have to remove all tokens (see CLI section above) and create new ones from the scratch.

Contribution with ddev
----------------------

[](#contribution-with-ddev)

This repository provides a DDEV-backed development environment. If DDEV is installed, simply run the following commands to quickly set up a local environment with example usages:

- `ddev start`
- `ddev initialize`

### Requirements

[](#requirements)

1. Install ddev, see:
2. Install git-lfs, see:

### Installation

[](#installation-1)

1. Clone this repository
2. Run `ddev start`
3. Run `ddev initialize` to setup configurations and test database

Branchinfo
----------

[](#branchinfo)

- master Branch - Next Major Version

Early Access Programm for TYPO3 14 support
------------------------------------------

[](#early-access-programm-for-typo3-14-support)

ℹ️ **TYPO3 14 compatibility**

> See [EAP page (DE)](https://www.in2code.de/agentur/typo3-extensions/early-access-programm/) or [EAP page (EN)](https://www.in2code.de/en/agency/typo3-extensions/early-access-program/) for more information how to get access to a TYPO3 14 version

Changelog
---------

[](#changelog)

VersionDateStateDescription13.0.12025-07-26TaskMove extension icon to Configuration folder13.0.02025-03-19TaskSupport TYPO3 12 and 13 now8.0.02023-10-24TaskSupport TYPO3 11 and 12 now7.2.02023-02-16TaskAdd PHP 8 support7.1.02022-09-22FeatureAdd optional static file include for styling of default layout7.0.02022-02-21TaskSupport TYPO3 10 and 11 now6.2.12021-10-01BugfixPrevent exception if image is a video6.2.02021-07-09FeatureAdd comand that allows you to delete all existing tokens6.1.32021-06-09BugfixUse thumbnail images when storing local to allow video previews6.1.22021-06-09BugfixDon't convert UserId to float value6.1.12021-06-09TaskHarden middleware with code recognization6.1.02021-04-13TaskFix problem "Field id specified more than once. This is only possible before version 2.1" - because of a change of the instagram interface6.0.22021-03-17TaskAdd extension key to composer.json file, small documentation update6.0.12021-03-15BugfixChange int to string field type for userId and appId to also handle large numbers6.0.0 !!!2021-03-15TaskAnother rebuild now with the useage of the original Instagram API to grap images. See installation part in documentation what you have to do now. FlexForm, Scheduler and HTML-Templates have changed (this is a pitty, but have to be done).5.1.02021-01-21FeatureRender images in listview in webp format.5.0.22020-12-23BugfixAdd a subject for error mails.5.0.12020-11-27BugfixEnable caching for the plugin.5.0.02020-11-16FeaturePass a sessionid to instagram for blocked requests. Added a notification service for CURL errors.4.0.12020-11-14BugfixFix typo in ext\_tables.sql4.0.0 !!!2020-11-13TaskAdd a scheduler task to import feeds (without RSS feed now). A plugin allows you to push the images into the frontend3.0.0 !!!2020-06-05TaskUse RSS-feed now for a workarround that server request are blocked by instagram2.0.02020-05-08TaskStore images locally now to improve privacy of your visitors. Use content element uid for building individual caches now1.1.02020-04-29TaskOpen links in new tabs, don't cache the view because of own caching framework usage1.0.02020-04-29TaskInitial release

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance57

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 74.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~34 days

Total

28

Last Release

296d ago

Major Versions

5.1.0 → 6.0.02021-03-14

6.2.1 → 7.0.02022-02-21

7.2.0 → 8.0.02023-11-28

6.2.2 → 9.0.02025-03-12

9.0.0 → 13.0.02025-03-19

PHP version history (5 changes)1.0.0PHP &gt;=7.2.0

4.0.1PHP ^7.2

7.2.0PHP ^7.2 || ^8.0

8.0.0PHP ^7.4 || ^8.0

9.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7b0e95a86a09cd1d3f7a0089ae701ccbe840ae9d794def4ef1829ceae48d061?d=identicon)[in2code](/maintainers/in2code)

---

Top Contributors

[![einpraegsam](https://avatars.githubusercontent.com/u/89055?v=4)](https://github.com/einpraegsam "einpraegsam (73 commits)")[![pixeldesu](https://avatars.githubusercontent.com/u/1774242?v=4)](https://github.com/pixeldesu "pixeldesu (16 commits)")[![mschwemer](https://avatars.githubusercontent.com/u/103594?v=4)](https://github.com/mschwemer "mschwemer (2 commits)")[![sbusemann](https://avatars.githubusercontent.com/u/3660954?v=4)](https://github.com/sbusemann "sbusemann (2 commits)")[![quidage](https://avatars.githubusercontent.com/u/1376696?v=4)](https://github.com/quidage "quidage (1 commits)")[![juergen-venne](https://avatars.githubusercontent.com/u/4092408?v=4)](https://github.com/juergen-venne "juergen-venne (1 commits)")[![cehret](https://avatars.githubusercontent.com/u/5031075?v=4)](https://github.com/cehret "cehret (1 commits)")[![IchHabRecht](https://avatars.githubusercontent.com/u/1453345?v=4)](https://github.com/IchHabRecht "IchHabRecht (1 commits)")[![beardcoder](https://avatars.githubusercontent.com/u/9371658?v=4)](https://github.com/beardcoder "beardcoder (1 commits)")

---

Tags

instagramtypo3typo3-extensioninstagram

### Embed Badge

![Health badge](/badges/in2code-instagram/health.svg)

```
[![Health](https://phpackages.com/badges/in2code-instagram/health.svg)](https://phpackages.com/packages/in2code-instagram)
```

###  Alternatives

[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[christophlehmann/imageoptimizer

Optimize uploaded/processed images with binaries of your choice

46501.8k](/packages/christophlehmann-imageoptimizer)[plan2net/webp

Creates WebP copies for images (TYPO3 CMS)

661.4M3](/packages/plan2net-webp)[sitegeist/sms-responsive-images

Provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.

34493.1k2](/packages/sitegeist-sms-responsive-images)[lochmueller/focuspoint

Focuspoint integrate the focal point method to crop images in the frontend of the web page. Use the jQuery-focuspoint plugin (https://github.com/jonom/jquery-focuspoint example http://jonom.github.io/jquery-focuspoint/demos/helper/index.html) to crop the images. Use the function as wizard in the file list view and directly in the content element.

23179.1k](/packages/lochmueller-focuspoint)[smichaelsen/melon-images

Responsive Image Management

2489.3k](/packages/smichaelsen-melon-images)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
