PHPackages                             goldfinch/socialkit - 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. goldfinch/socialkit

ActiveSilverstripe-vendormodule

goldfinch/socialkit
===================

Facebook/Instagram API (META) integration for Silverstripe

v2.0.3(1y ago)37522[3 issues](https://github.com/goldfinch/socialkit/issues)MITPHPPHP &gt;=8.0

Since Jan 18Pushed 1y ago2 watchersCompare

[ Source](https://github.com/goldfinch/socialkit)[ Packagist](https://packagist.org/packages/goldfinch/socialkit)[ RSS](/packages/goldfinch-socialkit/feed)WikiDiscussions main Synced 1mo ago

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

🦅 Social Feed, Facebook, Instagram API for Silverstripe
=======================================================

[](#-social-feed-facebook-instagram-api-for-silverstripe)

[![Silverstripe Version](https://camo.githubusercontent.com/a798a57963ddebe0c33c27c757b7722fc95a0a6cc52f7c1839a90238934cafe4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53696c7665727374726970652d253545352e312d3030356165312e7376673f6c6162656c436f6c6f723d7768697465266c6f676f436f6c6f723d666666666666266c6f676f3d646174613a696d6167652f7376672b786d6c3b6261736536342c50484e325a79423462577875637a30696148523063446f764c336433647935334d793576636d63764d6a41774d43397a646d636949485a705a58644362336739496a41674d4341784d4445754d446b78494455344c6a55314e5349675a6d6c7362443069497a41774e57466c4d53496765473173626e4d36646a30696148523063484d364c7939325a574e30595335706279397559573576496a3438634746306143426b50534a4e4e5441754d444531494455754f445534624330794d5334794f444d674d5451754f5745324c6a55674e693431494441674d434177494463754e445134494445774c6a59314e4777794d5334794f444d744d5451754f574d344c6a67784d7930324c6a4533494449774c6a6b324c5451754d444934494449334c6a457a494451754e7a6732637a51754d444934494449774c6a6b324c5451754e7a6731494449334c6a457a624330324c6a59354d5341304c6a59334e6d4d314c6a55304d6941354c6a51784f4341784f4334774e7a67674e5334304e5455674d6a4d754e7a637a4c5451754e6a553051544d794c6a513349444d794c6a5133494441674d434177494455774c6a41784e5341314c6a67324d6e70744d5334774e5467674e4459754f444933624449784c6a49344e4330784e433435595459754e5341324c6a55674d434178494441744e7934304e446b744d5441754e6a557a5444517a4c6a59794d7941304d6934774d6a686a4c5467754f44457a494459754d5463744d6a41754f545535494451754d4449354c5449334c6a45794f5330304c6a63344e484d744e4334774d6a6b744d6a41754f545535494451754e7a67304c5449334c6a45794f5777324c6a59354d5330304c6a59334e6b4d794d6934304d79307a4c6a6b334e6941354c6a67354e4330754d44457a494451754d546b34494445774c6a41354e6d457a4d6934304e79417a4d6934304e794177494441674d4341304e6934344e7a55674e4449754e546b7965694976506a777663335a6e50673d3d)](https://packagist.org/packages/goldfinch/social-media)[![Package Version](https://camo.githubusercontent.com/d35854d56472c6b074172a2ee8b2dd84079f55462a7d2abd876e5cae6625ebe1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676f6c6466696e63682f736f6369616c2d6d656469612e7376673f6c6162656c436f6c6f723d33333326636f6c6f723d463843363330266c6162656c3d56657273696f6e)](https://packagist.org/packages/goldfinch/social-media)[![Total Downloads](https://camo.githubusercontent.com/1b806f0ee8ba0505b29569cb0491f5ad33b35dffc80c22fa6a2ccb14843162e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676f6c6466696e63682f736f6369616c2d6d656469612e7376673f6c6162656c436f6c6f723d33333326636f6c6f723d463843363330266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/goldfinch/social-media)[![License](https://camo.githubusercontent.com/0f0d1a890133f0bc532be6e12feb3971811a3fe080ec5840b7d1b054d10aea3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f676f6c6466696e63682f736f6369616c2d6d656469612e7376673f6c6162656c436f6c6f723d33333326636f6c6f723d463843363330266c6162656c3d4c6963656e7365)](https://packagist.org/packages/goldfinch/social-media)

[![Meta](https://raw.githubusercontent.com/goldfinch/social-media/main/meta.svg)](https://raw.githubusercontent.com/goldfinch/social-media/main/meta.svg)

Social media Meta Integration for Silverstripe. Fetch and display Facebook/Instagram posts as a feed on your website. Easy to customize.

Install
-------

[](#install)

```
composer require goldfinch/social-media
```

#### 1. Create Meta App

[](#1-create-meta-app)

[developers.facebook.com/apps/creation](https://developers.facebook.com/apps/creation/)

#### 2. Generate encryption key

[](#2-generate-encryption-key)

All sensitive data that comes from Meta (ID,secret,tokens) are being encrypted in the database. Therefore we need a key. You can generate it using [**Taz**](https://github.com/goldfinch/taz)🌪️ module by running CLI command:

```
php taz generate:encryption-key
```

or dumping helper function

```
LeKoala\Encrypt\EncryptHelper::generateKey();
```

#### 3. Save the key in `.env`

[](#3-save-the-key-in-env)

```
ENCRYPTION_KEY={mykey}
```

#### 4. Set up a Facebook Feed

[](#4-set-up-a-facebook-feed)

- Open **Social media** admin module that comes with this package `/admin/social-media` and navigate to *Settings &gt; API*
- Enable *Facebook API* (checkbox)
- Set up the following fields:

    1. **App ID**

        Go to [developers.facebook.com/apps/**MYAPPID**/settings/basic](https://developers.facebook.com/apps/__MYAPPID__/settings/basic/)

        Get *App ID*
    2. **App Secret**

        Go to [developers.facebook.com/apps/**MYAPPID**/settings/basic](https://developers.facebook.com/apps/__MYAPPID__/settings/basic/)

        Get *App secret*
    3. **Page ID**

        Go to [www.facebook.com/**MYPAGE**/about\_profile\_transparency](https://www.facebook.com/__MYPAGE__/about_profile_transparency)

        *Page transparency* reveals *Page ID*
    4. **Access Token**

        Go to [developers.facebook.com/tools/explorer](https://developers.facebook.com/tools/explorer/)

        Select *Meta App*, *User Token*, with `pages_manage_posts` permission and *Generate Access Token*
    5. **Fields**: [developers.facebook.com/docs/graph-api/reference/v18.0/page/feed#readfields](https://developers.facebook.com/docs/graph-api/reference/v18.0/page/feed#readfields)

        See [all fields](https://github.com/goldfinch/social-media?tab=readme-ov-file#facebook-fields) that you can copy and paste here
    6. **Limit**:

        Set post limit (for sync), `10`

✅ Make sure to **Save** it. All set to go 🎉

To get **Long-Lived Access Token** click **Get** button or run `/dev/tasks/SocialMediaToken`

To fetch posts, run the task by clicking the **Sync** button on the same page or jump on `/dev/tasks/SocialMediaSync`

#### 5. Set up an Instagram Feed

[](#5-set-up-an-instagram-feed)

- Open **Social media** admin module that comes with this package `/admin/social-media` and navigate to *Settings &gt; API*
- Enable *Instagram API* (checkbox)
- Set up the following fields:

    1. **App Secret**

        Go to [developers.facebook.com/apps/**MYAPPID**/instagram-basic-display/basic-display](https://developers.facebook.com/apps/__MYAPPID__/instagram-basic-display/basic-display/)

        Get *Instagram App Secret*
    2. **Long-Lived Access Token**

        Go to [developers.facebook.com/apps/**MYAPPID**/instagram-basic-display/basic-display](https://developers.facebook.com/apps/__MYAPPID__/instagram-basic-display/basic-display/)

        Get *Get token (User Token Generator) - Add or Remove Instagram Testers*
    3. **Fields**: [developers.facebook.com/docs/instagram-basic-display-api/reference/media/#fields](https://developers.facebook.com/docs/instagram-basic-display-api/reference/media/#fields)

        See [all fields](https://github.com/goldfinch/social-media?tab=readme-ov-file#instagram-fields) that you can copy and paste here
    4. **Limit**:

        Set post limit (for sync), `10`

✅ Make sure to **Save** it. All set to go 🎉

To fetch posts, run the task by clicking the **Sync** button on the same page or jump on `/dev/tasks/SocialMediaSync`

Cron tasks
----------

[](#cron-tasks)

You might want to set up cron tasks for automation

```
/dev/tasks/SocialMediaRefresh # refresh token once in 4 weeks
/dev/tasks/SocialMediaSync # once in hour (or as you wish)
```

Usage
-----

[](#usage)

Mixed social feed with Facebook &amp; Instagram posts (sorted by post date)

```
$SocialFeed
```

Facebook feed only

```
$SocialFeed.FacebookFeed
$SocialFeed.FacebookFeed(15)
```

Facebook posts as `ArrayList`

```

```

Instagram feed only

```
$SocialFeed.InstagramFeed
$SocialFeed.InstagramFeed(15)
```

Instagram posts as `ArrayList`

```

```

Templates and modifications
---------------------------

[](#templates-and-modifications)

To modify templates for your needs, copy them into your *templates* folder. Use [**Taz**](https://github.com/goldfinch/taz) command that does that for you

If you haven't used [**Taz**](https://github.com/goldfinch/taz)🌪️ before, *taz* file must be presented in your root project folder `cp vendor/goldfinch/taz/taz taz`

```
php taz vendor:social-media:templates
```

Elemental Block
---------------

[](#elemental-block)

If you use [silverstripe-elemental](https://github.com/silverstripe/silverstripe-elemental), this module comes with *Social Media* block that handles social feeds for you

Useful data
-----------

[](#useful-data)

#### Social link fields

[](#social-link-fields)

You can also store social links with this module *Social media &gt; Main*

```

    Facebook

    Instagram

```

#### Instagram fields

[](#instagram-fields)

```
caption,id,is_shared_to_feed, media_type,media_url,permalink,thumbnail_url,timestamp,username,children

```

#### Facebook fields

[](#facebook-fields)

```
id,actions,admin_creator,allowed_advertising_objects,application,attachments,backdated_time,call_to_action,can_reply_privately,child_attachments,created_time,feed_targeting,from,full_picture,icon,instagram_eligibility,is_eligible_for_promotion,is_expired,is_hidden,is_instagram_eligible,is_popular,is_published,is_spherical,message,message_tags,parent_id,permalink_url,place,privacy,promotable_id,properties,sheduled_publish_time,shares,status_type,story,story_tags,subscribed,targeting,to,updated_time,video_buying_eligibility,likes.summary(total_count),comments.summary(total_count),reactions.summary(total_count)

```

Previews
--------

[](#previews)

#### API settings

[](#api-settings)

[![API settings](screenshots/api-settings.png)](screenshots/api-settings.png)

#### Demo social feed output

[](#demo-social-feed-output)

[![Demo socialfeed](screenshots/demo-feed.png)](screenshots/demo-feed.png)

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Recently: every ~19 days

Total

21

Last Release

723d ago

Major Versions

v1.0.16 → v2.0.02024-03-07

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2291826?v=4)[goldfinch](/maintainers/goldfinch)[@goldfinch](https://github.com/goldfinch)

---

Top Contributors

[![goldfinch](https://avatars.githubusercontent.com/u/2291826?v=4)](https://github.com/goldfinch "goldfinch (85 commits)")

---

Tags

facebookinstagramsilverstripemetasocial mediainstagram-silverstripefacebook-silverstripesocial-media-silverstripefacebook-developers

### Embed Badge

![Health badge](/badges/goldfinch-socialkit/health.svg)

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

###  Alternatives

[jonom/silverstripe-share-care

Social media sharing previews and customisation for Silverstripe

2932.7k1](/packages/jonom-silverstripe-share-care)

PHPackages © 2026

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