Gigya Job Openings

Update Status Demo

Skip to end of metadata
Go to start of metadata


See it in Action

Step 1: Connect

Step 2: Update Status
Click the button below to update your status


Read More

API Reference

Check Out the Code

    <title>Gigya Demo  - update status</title>
	<SCRIPT type="text/javascript" lang="javascript" 
<div id="runningCodeExample" style="border: 1px solid skyblue; padding: 15px; width: 400px; display: block; height: auto;">
        function onLoad()
            // get user info
            // register for connect status changes
            gigya.socialize.addEventHandlers({ onConnectionAdded: renderUI, onConnectionRemoved: renderUI }); 
		function renderUI(res)
		    document.getElementById('btnUpdateStatus').disabled = (res.user==null || !res.user.isConnected);
		// Update the user's status
		function setStatus()
			var params = 
			    status: "This is a Status update test with a link. "
					+ "Check out Gigya's RaaS Demo, here is the link:",
		// Display a status message according to the response from reportAction.
		function setStatus_callback(response)
			switch (response.errorCode )
				case 0:
					document.getElementById('status').style.color = "green";
					document.getElementById('status').innerHTML = "Status Updated.";
					document.getElementById('status').style.color = "red";
					document.getElementById('status').innerHTML = "Unable to update status. response=" 
					+ response.errorCode + "; " + response.errorMessage;
	<h5 >Step 1: Connect</h5>
	    <div id="divConnect"></div>
    <script type="text/javascript">
	    // show 'Add Connections' Plugin in "divConnect"
			,showTermsLink:false // remove 'Terms' link
			,cid: "Status Example page"
			,enabledProviders:  "facebook, twitter, yahoo, google, linkedin"
			,containerID: "divConnect" // The component will embed itself inside the divConnect Div 
    <br />
    <h5>Step 2: Update Status</h5>
    <div >
    <span style="color:#6e6e6e" >Click the button below to update your status</span>
    </div><br />
    <input type=button id="btnUpdateStatus" onclick="javascript:setStatus()" value="post" />
    <div id="status"></div>



In order to make the above code work in your environment, please note:

  • 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 from 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.
  • If you are using https, be sure to further adjust the JS API url to:<Your_API_Key>.