Nowadays, many people are using Social Media, be it Facebook, Google+, Twitter etc. Therefore, using Social Login simplifies the registration process in just a few clicks instead of letting user's type in to a user registration form with their details. Among the many social networks out there, Facebook is one of the most popular one. In this post, we shall see how to login users to Osclass websites using Facebook.
So, for most of you who own an Osclass website must have tried the "Free Facebook Connect" Plugin that is available on Osclass Market.
It was easy to install and configure. Just one line of code to add to your Osclass template file and you have a "Login with Facebook" link.
It used to work. But after the Facebook API changes, it is no longer working. And it is not updated after that. May be the developers have stopped making free plugins. I can understand. You can confirm the status of this plugin from the review section here. I have even put up a comment on the review page somewhere during September, 2017.
My search continued for a plugin to make at least Facebook Login work on my Osclass website. And finally I stumbled on the following plugin below which is works. I tried this on 27 July 2018.
This plugin is very much similar to the Facebook Connect plugin above in terms of configuration steps required, except that is works! To use the above plugin on your Osclass website, following the steps below.
- Go to www.osclasspoint.com and search for "Facebook Login Free Osclass" plugin. Or click this link
- Register for an account and download the plugin.
- Upload the plugin to your Osclass website from Osclass Dashboard > Manage Plugins > Add > Browse the downloaded plugin > upload
- Enable the plugin and click on "Configure".
- Enter the Facebook App ID and App Secret of the Facebook App and click save.
It is assumed that you already have a Facebook App created for the website. From https://about-tutor.blogspot.com//search?q=how-to-create-facebook-app-id" target="_blank">previous post on how to create a Facebook App and get the App ID.
- Copy the Facebook App ID and App Secret Code and enter in the Osclass Plugin configuration page and save it.
IMPORTANT:
1) Make sure that the website domain is set on Facebook App Domain:
Go to https://developers.facebook.com, select your Facebook App. Go to Settings > Basic > App Domains and enter the domain of your application / website.
Example: If your website domain is "example.com", just enter "example.com" in the "App Domains" at the Facebook App Settings > Basic > App Domains.
2) Update the "Valid OAuth Redirect URIs" on the Facebook App settings
- On the Osclass "Facebook Login Free Osclass Plugin" configuration page, notice the "Valid OAuth Redirect URIs" is generated and displayed above. Copy the URI link.
- Go to https://developers.facebook.com, select your app, and then under Products > Facebook Login > Settings > Valid OAuth Redirect URIs and enter the link of the URI copied from Osclass "Facebook Login Free Osclass Plugin" configuration page.
- Save it.
Displaying the "Login with Facebook" link or button on the Osclass website:
To show login/register button, put following code anywhere you want to show button (user-register.php, user-login.php):
<?php if(function_exists('facebook_login')) { echo facebook_login(); } ?>
To add this code to a php file of your Osclass Theme, you need access to your website file. You can either access them using an FTP client or directly from your host provided control panel.
It is recommended to place the code in the following Osclass pages:
1) Login Page
2) Registration Page
3) Header (header.php): Normally on most themes, the Login and Register links are in the header file. If so, you can also include this in the header file, so that it appears on the links.
Login with Facebook screenshot:
After the plugin is installed, it looks like this on the home page:
When a user clicks on the "Login with Facebook" button, the user is redirected to "https://www.facebook.com/login.php" to login. After the user successfully logs in to Facebook, the user is redirected back to the home page of the Osclass website.
User account created by the Osclass Facebook Login Plugin:
An account is created for the user, which is visible in Osclass dashboard > users as shown below:
The above plugin is only for Facebook Login. If you are looking for multiple social network login, then you can explore Osclass Market for premium or paid plugins. "Social Connect" and "OSclass Social Auth" are two paid Osclass Social Login plugins with higher reviews.
If you know about free Osclass Social Login plugins that allows multiple social account logins, do let us know in the comments.
Comments
Post a Comment