Enhance Social Logins in web application

We can implement the social Login Integration to the Websites or web application in order to widen the reach of your web applications.

To start with, to integrate Facebook with your web application, we need to register our web application or website with Facebook, and get an application ID(appId), along with a secret key . you can create and retrieve the appId on the App Dashboard ( https://www.facebook.com/developers/)

Here we try to  implement login in a web application using the JavaScript SDK.

This code will load and initialize the JavaScript SDK in your HTML page. Use your appId where indicated.

<!DOCTYPE html>
<title>Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
  // This is called with the results from from FB.getLoginStatus().
  function statusChangeCallback(response)...

jQuery – use the “on()” method instead of “live()”

As of jQuery 1.7,the .live() method is deprecated.Use .on() to attach event handlers.

Description: Attach an event handler function for one or more events to the selected elements.
The .on() method attaches event handlers to the currently selected set of elements in the jQuery object.

.on(eventType, selector, function)

$(“body”).on(“click”, “#element”, function(){

$(“body”).on(“click” , “p” ,function(){

Migration from .live() to .on()
$(‘#mainmenu a’).live(‘click’, function)
after, you move the child element (a) to the .on() selector: