Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3439044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:15:39+00:00 2026-05-18T08:15:39+00:00

I’ve just started using Gigya to allow users to connect to my site. I

  • 0

I’ve just started using Gigya to allow users to connect to my site. I already have a login system so I just want to connect existing users to the Gigya service.

To do this I have called the “gigya.services.socialize.notifyLogin” function which returns a Gigya User object with the UID provided by my site. [fig 1]
Do I need to do anything with this User object, like add it to a cookie or is it just for reference.

The problem that Im having is on another page, I want to allow users to connect to their social media accounts. I use the “showAddConnectionsUI” function passing my api key, but the returned object does NOT have the User object in, although the documentation says it should. How do I get the users conenctions and the key information from this function. Do I need to send any additional information along with my api key. [fig 2]

I have spent several days reading the wiki, documentation and forum for advice but I am still stuck. Any help would be greatly appreciated. Thanks in advance, Ben

[fig 1]

<script type="text/javascript" src="http://cdn.gigya.com/js/socialize.js?apiKey=<?php echo $key; ?>"></script>
<script type="text/javascript">
    var gigyaConf = { APIKey: "<?php echo $key; ?>", signIDs: "true" }

    var signature = "<?php echo $signature; ?>";
    var siteUID   = "<?php echo $userId; ?>";
    var timestamp = "<?php echo $timestamp; ?>";

    var gigyaParams =
    {
        siteUID:siteUID,
        timestamp:timestamp,
        signature:signature,
        callback:gigyaNotifyLoginCallback
    };

    gigya.services.socialize.notifyLogin(gigyaConf, gigyaParams);

    function gigyaNotifyLoginCallback(eventObj) {
        if ( eventObj.errorCode != 0 ) {
            alert('Gigya Error: ' + eventObj.errorMessage);
        }
    }
</script>

[fig 2]

<script type="text/javascript" lang="javascript" src="http://cdn.gigya.com/JS/socialize.js?apikey=<?php echo $key; ?>"></script>
<script>
    var conf = { APIKey: '<?php echo $key; ?>', signIDs: 'true' };

    $(document).ready(function(){
        gigya.services.socialize.getUserInfo(conf, { callback: renderUI });

        gigya.services.socialize.addEventHandlers(conf,
        {
            onConnectionAdded: renderUI,
            onConnectionRemoved: renderUI
        });
    });
</script>

<script>
    function renderUI(res) {
        if (res.user != null && res.user.isConnected) {
            document.getElementById("name").innerHTML = res.user.nickname;
            if (res.user.thumbnailURL.length > 0)
                document.getElementById("photo").src = res.user.thumbnailURL;
            else
                document.getElementById("photo").src = "http://cdn.gigya.com/site/images/bsAPI/Placeholder.gif";
            document.getElementById("profile").style.display = "block";
        } else {
            document.getElementById("profile").style.display = "none";
        }
    }
</script>
<div id="content">
    <h5>Step 1: Connect</h5>
    <div id="divConnect"></div>
    <script type="text/javascript">
        gigya.services.socialize.showAddConnectionsUI(conf, {
            height:65,
            width:175,
            showTermsLink:false,
            hideGigyaLink:true,
            useHTML:true,
            containerID: "divConnect"
        });
    </script>
    <br />
    <h5>Step 2: See User Info</h5><br />
    <div id=profile style="display:none;">
        <img id="photo" src="" width="60" />
        <br />
        <span id="name" ></span>
    </div>
</div>

Any help, advice, code snippits that would help will be greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:15:39+00:00Added an answer on May 18, 2026 at 8:15 am

    Re: your first question, not required to do anything special with the Gigya User object. It’s for your reference.

    Re: your code, I can’t tell if you’re using JQuery but I was getting an error with your $(document).ready function. I modified your code slightly by adding body onLoad and everything worked. This assumes you have connected with a provider. Here’s my code… hope it helps:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript" lang="javascript" src="http://cdn.gigya.com/JS/socialize.js?apikey=<?php echo $key; ?>"></script>
    <script>
    
        var conf = { APIKey: '<?php echo $key; ?>', signIDs: 'true' };
    
        function onLoad() {
    
            gigya.services.socialize.getUserInfo(conf, { callback: renderUI });
    
            gigya.services.socialize.addEventHandlers(conf,
            {
                onConnectionAdded: renderUI,
                onConnectionRemoved: renderUI
            });
        }
    
    </script>
    
    <script>
        function renderUI(res) {
    
            if (res.user != null && res.user.isConnected) {
                document.getElementById("name").innerHTML = res.user.nickname;
                if (res.user.thumbnailURL.length > 0)
                    document.getElementById("photo").src = res.user.thumbnailURL;
                else
                    document.getElementById("photo").src = "http://cdn.gigya.com/site/images/bsAPI/Placeholder.gif";
                document.getElementById("profile").style.display = "block";
            } else {
                document.getElementById("profile").style.display = "none";
            }
        }
    </script>
    
    
    <body onload="onLoad()">
    
    <div id="content">
        <h5>Step 1: Connect</h5>
        <div id="divConnect"></div>
        <script type="text/javascript">
            gigya.services.socialize.showAddConnectionsUI(conf, {
                height:65,
                width:175,
                showTermsLink:false,
                hideGigyaLink:true,
                useHTML:true,
                containerID: "divConnect"
            });
        </script>
        <br />
        <h5>Step 2: See User Info</h5><br />
        <div id=profile style="display:none;">
            <img id="photo" src="" width="60" />
            <br />
            <span id="name" ></span>
        </div>
    </div>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have just tried to save a simple *.rtf file with some websites and
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.