PHPackages                             moosylvania/silverstripe-instagram-module - 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. moosylvania/silverstripe-instagram-module

ActiveSilverstripe-module[API Development](/categories/api)

moosylvania/silverstripe-instagram-module
=========================================

Instagram Module for SilverStripe.

2313[2 PRs](https://github.com/Moosylvania/Silverstripe-Instagram-Module/pulls)PHP

Since Jan 19Pushed 10y ago5 watchersCompare

[ Source](https://github.com/Moosylvania/Silverstripe-Instagram-Module)[ Packagist](https://packagist.org/packages/moosylvania/silverstripe-instagram-module)[ RSS](/packages/moosylvania-silverstripe-instagram-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Silverstripe Instagram Module
=============================

[](#silverstripe-instagram-module)

Maintainer: Mitch Viner &lt; mitch.viner (at) moosylvania (dot) com &gt;

Requirements
------------

[](#requirements)

Silverstripe v 3.1+

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

[](#introduction)

Create and Manage real-time subscriptions to [Instagram's realtime API](http://instagram.com/developer/realtime/) via the SilverStripe Admin.

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

[](#installation)

Copy the instagram directory into the root of your Silverstripe installation.

Setup
-----

[](#setup)

Open instagram/\_config/config.yml - take note of the callbackURL already set in the configuration.

Create an [Instagram Client Application](http://instagram.com/developer/clients/manage/), set the Redirect URI to 'http://{yourdomain.com}/instagram/auth'.

Insert your [Instagram Application's](http://instagram.com/developer/clients/manage/) Client ID and Client Secret into the config.yml file.

You're now ready to create real-time subscriptions through the CMS.

### Creating Subscriptions

[](#creating-subscriptions)

From the CMS create a new subscription by providing a name and a type, upon saving you can then click the 'Update Access Token' button, then 'Subscribe Real-time'.

A note on subscription types:

- User: All users that authorize the Instagram will be bucketed into a single subscription, removing one removes them all. This is how the Instagram API functions.
- Tag: Do not include the hashtag in the configuration.

### Advanced Options

[](#advanced-options)

To perform additional processing on each post:

Create a DataExtension in your 'mysite' directory with the functionality you wish to perform on each post as it is received. Attach the DataExtension to the InstagramPost class as you would with any Extension.

In the \_config.yml file, set the PostReceivedCallback to the name of your method. An example Extension to use curl to download each post is included below.

When you're finished with your additional processing, set the InstagramPost::Processed property to true and write it to the database.

#### Example Extension

[](#example-extension)

In mysite/InstagramPostExtension.php

```
class InstagramPostExtension extends DataExtension {

	private static $has_one = array(
		"LocalImage" => "Image"
	);

	public function processNewPost() {

		if(isset($this->owner->ID)) {
			$this->_downloadImage($this->owner->ImageURL);

			$this->owner->Processed = true;
			$this->owner->write();
		}

	}

	protected function _downloadImage($img) {
		if($img) {
			$imgName = explode('/', $img);
			$imgName = $imgName[count($imgName)-1];

			$file = __DIR__.'/../../assets/instagram/'.$imgName;
			$fh = fopen(__DIR__.'/../../assets/instagram/'.$imgName, 'a+');
			$opts = array(
				CURLOPT_FILE => $fh,
				CURLOPT_TIMEOUT => 28800,
				CURLOPT_URL => $img
			);

			$ch = curl_init();
			curl_setopt_array($ch, $opts);
			curl_exec($ch);

			$imgObj = new Image();
			$imgObj->Filename = 'assets/instagram/'.$imgName;
			$imgObj->Title = str_replace('.jpg', '', $imgName);
			$imgObj->write();

			$this->owner->LocalImageID = $imgObj->ID;
			$this->owner->write();
		}
	}

}

```

In mysite/\_config.php add:

```
DataObject::add_extension('InstagramPost', 'InstagramPostExtension');

```

Example instagram/\_config.yml

```
Instagram:
  clientID:
  clientSecret:
  callbackUrl: instagram/auth
  subscribeCallback: instagram/handlepost
  postReceivedCallback: 'processNewPost'

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b58123837a8364d4ff51b9e31f46aecac3667a74a12e01a061a5c75484668f4?d=identicon)[obj63mc](/maintainers/obj63mc)

---

Top Contributors

[![Mviner04](https://avatars.githubusercontent.com/u/558749?v=4)](https://github.com/Mviner04 "Mviner04 (6 commits)")[![obj63mc](https://avatars.githubusercontent.com/u/443120?v=4)](https://github.com/obj63mc "obj63mc (5 commits)")[![sn4h](https://avatars.githubusercontent.com/u/131519602?v=4)](https://github.com/sn4h "sn4h (1 commits)")

### Embed Badge

![Health badge](/badges/moosylvania-silverstripe-instagram-module/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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