A social feed module for fetching content from Facebook and Twitter

Installs: 590

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 17


2.15.3 2019-02-23 02:05 UTC

This package is not auto-updated.

Last update: 2023-01-23 20:44:35 UTC


Combine social media posts from Facebook, Twitter and Instagram into a single feed. Each feed is available separately also.


composer require isaacrankin/silverstripe-social-feed


<% include SocialFeed %>

Alternatively you can call the SocialFeed method directly like so:

<div class="social-feed">
		<% loop SocialFeed %>
				<a href="$URL" target="_blank">
					<h4>Type: $Type</h4>
					<p>Created: $Created</p>
					<p>User: $UserName</p>
					<p><img src="$Image" /></p>
		<% end_loop %>

The posts are ordered from newest to oldest.

Within the SocialFeed control loop the following values are available:

  • $URL - a URL for the social media post
  • $Type - the type of post, either "facebook", "twitter" or "instagram"
  • $Created - the creation/posted date of the post
  • $UserName - the user who made the post
  • $Image - the main image for the post
  • $Data - all of the data for a single post in the original structure returned from the API's. Read documentation for the API's to see what's available.


All SocialMediaProvider::getFeed() calls are cached for 15 minutes and can be cleared either in the CMS or by appending ?socialfeedclearcache=1 in developer mode.

There is also a SocialFeedCacheTask that you can setup as a cronjob on your server to ensure that the end-user never has to wait for your server to make its API calls to Facebook, Twitter, etc and update the various social feed caches.

Alternatively, if you're using the QueuedJobs module, this process will be handled automatically for you, as a queued job is setup to update the cache every 10 minutes.


SilverStripe 4 or newer


The Twitter data is a collection of the most recent Tweets posted by the user. The following API endpoint is used

Twitter API documentation for user timeline


You'll need to create a Twitter app here


The Facebook data returned is the most recent posts for a given Facebook Page. The following API endpoint is used

Facebook API documentation


To get the necessary Facebook API credentials you'll need to create a Facebook App.


The most recent media published for a user. The following API endpoint is used Instagram API documentation for resent user media


To get the necessary Instagram API credentials you'll need to create an Instagram Client.

You'll need to add the correct redirect URI in the settings for the Instagram App, such as