Download the sources of the Daily Recipe
This demo outlines how to make a web site social using Gigya's Customer Identity platform. The demo site's code is available for you to download by clicking the Download Code link above, use and learn about the site implementation. Be sure to follow the instructions in the README_FIRST.txt file to initially configure the site.
Gigya provides a large array of features for sites and this sample site makes use of only a few of these capabilities. Some of the features that are used in this site are:
- Registration-as-a-Service - Complete user management platform.
The platform is a cloud based user management system that includes Social login and registration - the ability to sign up and login using your social identity (i.e Facebook, Twitter, LinkedIn, etc), automatically Manage account linking between a user’s existing site account and social identities, connects to more than 20 social and identity providers, enables access to rich profile data including email addresses, provides standardized data field structure and nomenclature across identity providers, comprehensive data analysis, and policies restrictions for user actions performed on your website.
- Share Bar plugin - The plugin displays a bar of buttons for sharing to social destinations.
- Comments plugin - The plugin displays a commenting stream.
- Reactions plugin - A one-click reaction buttons bar, allowing users to easily interact with posts or content on your site.
- Game Mechanics plugins - Social loyalty and rewards plugins, increasing site engagement and making users' experience more enjoyable.
- Rating & Reviews plugins - The plugins give your customers an easy way to provide feedback on product and content across your site. The Rating & Reviews plugins are available in bottom of the About page of the site.
- Facebook Open Graph Actions - Use Gigya's API to publish Open Graph actions.
From the implementation point of view: The site's web pages use the Gigya Web SDK to integrate Gigya Add-ons and client site API method calls.
The server side code is responsible for communicating with Gigya, whenever server-to-server communication is required, and to perform the various tasks on the back-end.
The following diagram demonstrates the general Login flow, as derived from Gigya's login screen, and the back-end solutions required to implement it when RaaS is not used:
The Virtue of Screen-Sets
Client implementation is reduced to a single call to accounts.showScreenSet with the appropriate parameters.
There is no need to implement a login handler to authenticate and verify logged in users, a registration handler to validate and check availability for unique fields, a database to store user information, or any other server side functionality required to fully support the user flow. All of these functions are handled internally by RaaS.
RaaS UI Components
The Login \ Registration buttons on the site's front page are RaaS components that display the respective screen-sets, which handle user registration and login OOTB.
Implementation is as simple as placing a call to the showScreenSet method with the appropriate parameters.
Pressing the Login link will open the default RaaS Login screen-set, which is a set of logically connected screens that handle the login process in every aspect:
Pressing the Register link will open the default RaaS Registration screen-set, which is a set of logically connected screens that handle the registration process in every aspect. Since the social login plugin is used for both Social Login AND Social Registration, it appears on both screens:
Gigya Plugins within a Web Page
Add-on Implementation Code Snippets
You can take a look at each of the Gigya components' source code by hovering over the component that you wish to examine and clicking Get Code, or click on Docs to open a link to Gigya's documentation on the relevant Add-on.
Once you click Get Code, a window will open containing the code that implements the selected Add-on. From there you can grab the code and paste it onto your website, and also adjust the parameters and examine the various options available for the plugin, along with the information available in the plugin's documentation page.
Installing the Site on Your Own Host
The installation is amazingly simple. In order to run the Daily Recipe site from your own hosting environment, follow these requirements:
- PHP 5.5 or higher installed.
- A valid and active Gigya API Key with RaaS enabled.
- Download the sources of the Daily Recipe site here and extract them into your host root folder.
- Obtain your Gigya API Key and Secret Key from the Site Dashboard page on the Gigya website (see also the Site Setup documentation, or the enclosed README_FIRST.txt).
- Edit the configuration file in the project's root directory called config.php:
Insert your Gigya API Key into the variable called $apiKey and your account Secret into the $currentSecret variable:
- Be sure to review the README_FIRST.txt file included in the download for additional, optional settings.
That's it, you are ready to go!
View or Edit Gigya Add-ons
You can also use the View or Edit Gigya Add-ons plugin to manipulate the Add-ons within the RaaS Demo Site and see how your changes appear in real-time. You can then copy the code directly from the plugin for use on your own site.
To see the complete documentation for the Gigya Add-ons Viewer and Editor plugin please see Gigya Add-ons Viewer.
Learn about the site implementation. Examine how Gigya's RaaS can be implemented within your site. Dive into the structure of the source files and folders that constitute this site, emphasizing the Gigya related parts within these source files.