Skip to content

Instantly share code, notes, and snippets.

@icydee
Created December 17, 2013 09:50
Show Gist options
  • Save icydee/8002512 to your computer and use it in GitHub Desktop.
Save icydee/8002512 to your computer and use it in GitHub Desktop.
LoginRadius test script
<html>
<head>
<script src="https://hub.loginradius.com/include/js/LoginRadius.js" ></script>
<script src="js/libs/login-radius.js" type="text/javascript"></script>
<script type="text/javascript">
var options={};
options.login=true;
LoginRadius_SocialLogin.util.ready(function () {
$ui = LoginRadius_SocialLogin.lr_login_settings;
$ui.interfacesize = "";
// make sure the following apikey is changed each time we change developer!
$ui.apikey = "78855680-671c-4c70-b194-2e392a0a7c81";
$ui.callback="";
$ui.lrinterfacecontainer ="interfacecontainerdiv";
LoginRadius_SocialLogin.init(options);
});
LoginRadiusSDK.onlogin = Successfullylogin;
function Successfullylogin() {
LoginRadiusSDK.getUserprofile(function (data) {
//just display to a html element
document.getElementById("profile").innerHTML = JSON.stringify(data);
});
return false;
};
</script>
</head>
<body>
<p>hello world</p>
<div id="interfacecontainerdiv" class="interfacecontainerdiv"></div>
<div id="profile" class="profile"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment