Download the PHP package nathancox/silverstripe-social-feed without Composer
On this page you can find all versions of the php package nathancox/silverstripe-social-feed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nathancox/silverstripe-social-feed
More information about nathancox/silverstripe-social-feed
Files in nathancox/silverstripe-social-feed
Package silverstripe-social-feed
Short Description A social feed module for fetching content from Facebook and Twitter
License BSD-3-Clause
Homepage http://github.com/nathancox/silverstripe-social-feed
Informations about the package silverstripe-social-feed
SilverStripe Social Feed
Combine social media posts from Facebook, Twitter and Instagram into a single feed. Each feed is available separately also.
Installation
Usage
Alternatively you can call the SocialFeed
method directly like so:
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.
Caching
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.
Requirements
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 https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi
Twitter API documentation for user timeline
Credentials
You'll need to create a Twitter app here https://apps.twitter.com/app/
The Facebook data returned is the most recent posts for a given Facebook Page.
The following API endpoint is used https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN
Credentials
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 https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS_TOKEN
Instagram API documentation for resent user media
Credentials
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 http://yoursite.com/admin/social-feed/SocialFeedProviderInstagram/
All versions of silverstripe-social-feed with dependencies
abraham/twitteroauth Version ^0.9.2
league/oauth2-facebook Version ^2.0
league/oauth2-instagram Version ^2.0