Was this article helpful?

Screen-set Hosted on Gigya

Last modified 15:21, 4 Feb 2014

The following example shows the default screen-set generated by Gigya's UI Builder. The screen-set is hosted on Gigya's server, and loaded to the web-page using the accounts.showScreenSet.

See it in Action

 

Check Out the Code

<html>
<head>
    <title>Gigya User Management Test</title>
 	<SCRIPT type="text/javascript" lang="javascript" 
	   src="http://cdn.gigya.com/JS/socialize.js?apikey=3_KXuUHI4qFVcD1RoiQZwoFHrNyoDogHoWusVDpuP95RudWiELEmNq0Yi7CI0U3AY_"></SCRIPT>
</head>
<body>
    <span style="font-size: 16px;font-weight: bold;letter-spacing: 1px;float: left;font-family: Arial;">

		<a href="#" onclick="gigya.accounts.showScreenSet({screenSet:'Login-web', mobileScreenSet:'Mobile-login'});">Login</a>&nbsp;&nbsp;|&nbsp;&nbsp; 
		<a href="#" onclick="gigya.accounts.showScreenSet({screenSet:'Login-web', mobileScreenSet:'Mobile-login', startScreen:'gigya-register-screen'});">Register</a>&nbsp;&nbsp;&nbsp;&nbsp;
		</br></br></br>
		<a href="#" onclick="gigya.accounts.showScreenSet({screenSet:'Profile-web', mobileScreenSet:'Profile-mobile'});">Edit Your Profile</a>&nbsp;&nbsp;&nbsp;&nbsp;
		</br></br></br>
		<a href="#" onclick="gigya.accounts.logout({callback:onLogout});">Logout</a>&nbsp;&nbsp;&nbsp;&nbsp;

	</span>

<script>
	function onLogout(response) {   
		if ( response.errorCode == 0 ) {                
			alert('You are now logged out'); 
		} 
		else { 
			alert('Error :' + response.errorMessage); 
		} 
	}
</script>
</body></html>

Note:
In order to make this code work in your environment, please:
  • Click the "view source" icon (link located above code on the right hand side) - This will open a popup window with a text version of the code, which you may copy.
  • The API key in the sample will only work on http://localhost/...
  • To load the page from your domain, modify the value of the "APIKey" field in the code to your own Gigya API Key. A Gigya API Key can be obtained on the Site Dashboard page on Gigya's website. Please make sure that the domain from which you are loading the page is the same domain name that you used for generating the API Key.

 
Was this article helpful?
Pages that link here
Page statistics
9536 view(s) and 2 edit(s)
Social share
Share this page?

Tags

This page has no custom tags set.

Comments

You must to post a comment.

Attachments