|
|
Recent pages |
Page last modified 14:11, 17 Mar 2010 by shirly
Gigya's Developer Documentation > API Reference > Client API (JavaScript & AS3) > Methods > socialize.getUserInfo
socialize.getUserInfoFrom $1Table of contents
DescriptionThis method is used to retrieve extended information regarding the current user. The information returned by this method is represented by a "User object". See the "User object" page for the full specification of the information available. Note: This method is also supported in our REST API. If you wish to execute this method from your server, please refer to REST API > socialize.getUserInfo.
Syntax
Method parametersconf objectPlease refer to the Conf object page for full specifications. params object members
Response object Data Members
Code Samplevar conf = {
APIKey:'2_fA4cZD0cEmxKUjDdNai8hyK4fZ-Jq7w4qm1x-pkS-7E6NDm90gAmrdcugVoaewUS'
};
function printResponse(response) {
if ( response.errorCode == 0 ) {
var user = response['user'];
var msg = 'User '+user['nickname'] + ' is ' +user['age'] + ' years old';
alert(msg);
}
else {
alert('Error :' + response.errorMessage);
}
}
gigya.services.socialize.getUserInfo(conf,{callback:printResponse});
function printResponse(response:Object):void {
if ( response.errorCode == 0) {
var user:Object = response['user'];
var msg:String = 'User '+user['nickname'] + ' is ' +user['age'] + ' years old';
trace(msg);
}
else {
trace('Error :' + response.errorMessage);
}
}
function getUserInfo():void {
var conf:Object = {
mcRoot:this.root,
APIKey:'2_fA4cZD0cEmxKUjDdNai8hyK4fZ-Jq7w4qm1x-pkS-7E6NDm90gAmrdcugVoaewUS'
};
gigya.services.socialize.getUserInfo(conf,{callback:printResponse});
}
Notes:
In "Get User Information" page you will find a complete working example which uses socialize.getUserInfo method. You may view the code, run it and view the outcome. Retrieved from "http://wiki.gigya.com/030_API_reference/010_Client_API/020_Methods/socialize.getUserInfo"
Tags:
|
||||||||||||||||||||||||||||||||||
|
Viewing Details: