Download the PHP package goldfinch/social-media without Composer
On this page you can find all versions of the php package goldfinch/social-media. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download goldfinch/social-media
More information about goldfinch/social-media
Files in goldfinch/social-media
Package social-media
Short Description Facebook/Instagram API (META) integration for Silverstripe
License MIT
Informations about the package social-media
🦅 Social Feed, Facebook, Instagram API for Silverstripe
Social media Meta Integration for Silverstripe. Fetch and display Facebook/Instagram posts as a feed on your website. Easy to customize.
Install
1. Create Meta App
developers.facebook.com/apps/creation
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🌪️ module by running CLI command:
or dumping helper function
3. Save the key in .env
4. Set up a Facebook Feed
- Open Social media admin module that comes with this package
/admin/social-media
and navigate to Settings > API - Enable Facebook API (checkbox)
-
Set up the following fields:
-
App ID
Go to developers.facebook.com/apps/MYAPPID/settings/basic
Get App ID
-
App Secret
Go to developers.facebook.com/apps/MYAPPID/settings/basic
Get App secret
-
Page ID
Go to www.facebook.com/MYPAGE/about_profile_transparency
Page transparency reveals Page ID
-
Access Token
Go to developers.facebook.com/tools/explorer
Select Meta App, User Token, with
pages_manage_posts
permission and Generate Access Token -
Fields: developers.facebook.com/docs/graph-api/reference/v18.0/page/feed#readfields
See all fields that you can copy and paste here
-
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
- Open Social media admin module that comes with this package
/admin/social-media
and navigate to Settings > API - Enable Instagram API (checkbox)
-
Set up the following fields:
-
App Secret
Go to developers.facebook.com/apps/MYAPPID/instagram-basic-display/basic-display
Get Instagram App Secret
-
Long-Lived Access Token
Go to developers.facebook.com/apps/MYAPPID/instagram-basic-display/basic-display
Get Get token (User Token Generator) - Add or Remove Instagram Testers
-
Fields: developers.facebook.com/docs/instagram-basic-display-api/reference/media/#fields
See all fields that you can copy and paste here
-
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
You might want to set up cron tasks for automation
Usage
Mixed social feed with Facebook & Instagram posts (sorted by post date)
Facebook feed only
Facebook posts as ArrayList
Instagram feed only
Instagram posts as ArrayList
Templates and modifications
To modify templates for your needs, copy them into your templates folder. Use Taz command that does that for you
If you haven't used Taz🌪️ before, taz file must be presented in your root project folder cp vendor/goldfinch/taz/taz taz
Elemental Block
If you use silverstripe-elemental, this module comes with Social Media block that handles social feeds for you
Useful data
Social link fields
You can also store social links with this module Social media > Main
Instagram fields
Facebook fields
Previews
API settings
Demo social feed output
License
The MIT License (MIT)
All versions of social-media with dependencies
silverstripe/framework Version ^5.0
silverstripe/admin Version ^2.0
goldfinch/helpers Version ^2.0
goldfinch/date Version ^1.0
lekoala/silverstripe-encrypt Version dev-master
goldfinch/silverstripe-jsontext Version ^2.1
guzzlehttp/guzzle Version ^7.7
unclecheese/display-logic Version ^3.0
jonom/silverstripe-someconfig Version ^1.0
silverstripe/crontask Version ^3.0
dnadesign/silverstripe-elemental Version ^5.0