We’ve been working with Sitecore for over 15 years, so we know a thing or two about it. During this time, we’ve developed custom Sitecore modules that enhance the platform.
Our latest development is the Social Media Mashup Module. This useful addition to Sitecore CMS and the Sitecore Experience Platform collects the article feed from your social media accounts like Facebook, Twitter, Google, Instagram, and YouTube.
The articles are synced to the Sitecore content tree along with the respective media. Supporting most versions of Sitecore the Social Media Mashup module re-uses content from social media channels and syncs it with your content management system. This means content doesn’t have to be created by Sitecore editors. This includes media assets like images and videos etc.
The module is also ideal for customers looking to reuse content from their social media platform without recreating content manually in Sitecore.
In this two-part series we’ll cover the Social Media Mashup module in detail. We’ll be exploring what it is, its benefits and a lot more. This first article will cover:
- Why use the Social Media Mashup Module
- How to configure the Social Media Mashup Module
- Benefits of the Social Media Mashup Module
- In summary
The Social Media Mashup module has two main steps. One is to sync the social platform content to CMS, the other is to create a component that renders this content on your website.
1. Why use the Social Media Mashup Module?
Do you have a lot of content going out in popular social media channels? Do you want that same content shown on your website? Then this module is an ideal marketing tool. It integrates into your Sitecore solution and imports the required content into Sitecore periodically without human interactions.
Also as mentioned earlier, the module also supports importing content as well as media like images and video URLs into CMS.
Make sure to have the API information ready for each social media network. For example, API Key, API Secret and other required information specific to the social platform.
To configure the content and media import into the Sitecore CMS, the social platform API key and Page ID will be required.
3. How to configure Social Media Mashup module
The integration involves the backend setup for validating the social platform connection and then the scheduled task to import content and media to the respective feed path.
Each social media feed is created as a ‘Feed’ item and its articles or pages placed in a Sitecore bucket beneath it for better content tree performance. Configuration results in:
- Scheduled task to run the import from social media platforms to CMS
- Continuous process to run the sync and get live data
- Sitecore components to display the data on website
- The social platform content items and media items are created under dedicated locations per site and per feed
The scheduled task imports content from the various social media platforms into Sitecore. The specific scheduled task picks up any configured social media feed and syncs the social media articles as bucket items.
Here are all the various scheduled tasks included in the module under the below path: /Sitecore/system/Tasks/Schedules/Feature/Tenant
Below is an example of what the Facebook feed looks like.
We also have a special implementation of the scheduled task so it can be triggered at a specific time, or multiple times a day if needed. The below section highlights how the Facebook feed is configured.
Facebook needs API Token to be able to communicate with the Facebook Graph API and collects all the information from social media posts: Follow the following steps:
- Go to https://developers.facebook.com/tools/explorer/
- Select the ‘Facebook App’ and ‘User or page’ dropdowns
- Click on 'Generate Access Token' if not already generated and copy the API token for the social feed sync
As the actual code requires Sitecore context, a simple console application is created to test the connection to the Facebook Graph API and retrieval of the page posts.
The screenshot below shows where the Facebook page id is entered, including other options:
Below is an example of how the synced posts are stored in the content tree under a feed definition item.
A similar structure is also used to store the images of the posts under the site’s media library folder.
4. Benefits of the Social Media Mashup Module
- Support for most Sitecore versions: The module can be used across most versions of Sitecore because it is just the backend import of the content from the social media platforms
- Easy to use: The scheduled task can be configured to run any number of times during the day, and it only needs to be set up once
- Low maintenance: Doesn't need as much monitoring as the API tokens and the required configurations for the social media platforms would hardly change. If there’s a need for new feed integration, then just create one
- Custom logging: The module has its own logging, different from Sitecore logging that makes it easy to troubleshoot for any issues
- Reduces time/efforts for content creation: The content doesn’t require to be recreated manually in Sitecore. It’s done automatically, and the content editor only needs to place the component on a page to present the content
- Live updates from social platforms: The module will not only import the newly created content but also checks and updates already synced content
- Supports multiple social platforms: Although the module currently supports five different social platforms, it can be easily extended
- Supports sync of images and video URLs: Syncs the images from the social platforms and stores them in the Sitecore media library, which makes it easier to present on the component. The video URLs are preserved on the article itself which is directly linked back to the video on the social platform
5. In summary
The Codehouse Social Media Mashup module is a simple tool that integrates five different social platforms with Sitecore. It’s easy to set up and use for both developers and marketers. It doesn’t need any special knowledge. The module currently supports Facebook, Twitter, Google, Instagram and YouTube.
Working with Codehouse
The Codehouse Social Media Mashup module is another addition to the custom Sitecore modules our dev teams have created. It’s the perfect tool to sync content from social platforms into Sitecore.
If you’re interested in syncing your social media content with your Sitecore system, get in touch and talk to our experts.
Part 2 of this series is coming soon. Watch this space...