Was this article helpful?

Friend

Last modified 11:38, 15 Sep 2014

Description

This object represents a person who is a friend of the current user. The Friend object may be retrieved with basic or extended information. The getFriendsInfo method retrieves by default only basic information; extended information can be requested by setting the detailLevel parameter. 

Note: Different providers provide different data. Thus, the availability of the data members of the Friend object depends on the specific provider.

 

Data Members

Basic Fields:

Field Name Type Description
UID string A unique ID for the person represented by this object. The UID is guaranteed to be consistent over time for users who were authenticated on the site by using either login or notifyLogin. Note that if notifyLogin was used then UID will return the same ID provided by the site.
Notes:
  • This field may be rather long in some cases, if you plan to store it in a DB the recommended field size is 300 characters.
  • The UID string must be encoded using the encodeURIComponent() function, before sending it to your server.
isSiteUID Boolean This field indicates if the UID is a site UID (provided by your site) or an ID generated by Gigya.
friendshipSignature string If the global configuration object's 'signIDs' field is set to 'true', Gigya "signs" the Friend Object (when returned by an API method) with a cryptographic signature, to prevent fraud. This field will hold the signature, which should be used for verification*.
signatureTimestamp number If the global configuration object's 'signIDs' field is set to 'true', Gigya "signs" the Friend Object (when returned by an API method) with a cryptographic signature, to prevent fraud. This field will hold the timestamp, which should be used for verification*. The timestamp is the GMT time of the response in UNIX time format (i.e. the number of seconds since Jan. 1st 1970).
oldestDataUpdatedTimestamp integer The time when the oldest data of the object was refreshed in Java time format, i.e. milliseconds since Jan. 1st 1970.
oldestDataAge  integer The difference in seconds between the oldestDataUpdatedTimestamp and the current time.
isSiteUser Boolean Indicates whether the current user is a user of the site. This is useful for checking which friends of the current user are also users of the same site.
identities dictionary object A dictionary object where the keys are the names of the providers to which the user is connected (i.e. 'facebook', 'yahoo', etc.) and the values are Identity objects received from that provider.
For example: If the user is connected to Facebook then user.identities['facebook'] is the identity object representing his Facebook identity and user.identities['facebook'].providerUID is the ID of the user in Facebook.
Note: For User objects returned by getFriendsInfo only identities that are actually friends of the current user will be included here. Suppose User A has a Facebook identity that is a friend of the Facebook identity of User B, and User B also has a Google identity. When asking for the friends of User A you will get User B but only with his Facebook identity.
nickname string The person's nickname, this may be either the nickname provided by the connected provider or a concatenation of the first and last names.
photoURL string The URL of person's full size photo.
thumbnailURL string The URL of person's thumbnail photo, when available.
friendshipSig string Deprecated. Please use the friendshipSignature parameter instead. 
timestamp string Deprecated. Please use the signatureTimestamp parameter instead.
This field will hold the timestamp in "yyyy-mm-dd HH:mm:ss" format where HH is in 24 hour time format.

 

* To verify the authenticity of the Friend Object, follow the instructions in the section Validate Friendship Signatures, using the UID, friendshipSignature and signatureTimestamp fields.

 

Extended Fields

Field Name Type Description
firstName  string The person's first name.
lastName string The person's last name.
gender string The person's gender. The value may be either 'm' or 'f'.
age number The person's age.
birthDay number The day in the month in which the person was born.
birthMonth number The month in which the person was born.
birthYear number The year in which the person was born.
email string The person's email.
country string The person's country.
state string The person's state.
city string The person's city.
zip string The person's zip code.
profileURL string The URL of the person's profile on his primary provider.

 

Top Providers Friend Data

  facebook_30.png twitter_30.png linkedin_30.png messenger_30.png yahoo_30.png
provider OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png
providerURL OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png
providerUIDSig OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png
nickname OK_Icon.png* OK_Icon.png* OK_Icon.png* OK_Icon.png OK_Icon.png
photoURL OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png  
thumbnailURL OK_Icon.png OK_Icon.png     OK_Icon.png
firstName OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png
lastName OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png OK_Icon.png
gender OK_Icon.png     OK_Icon.png OK_Icon.png
age         OK_Icon.png
birthDay       OK_Icon.png  
birthMonth       OK_Icon.png  
birthYear         OK_Icon.png*
country   OK_Icon.png OK_Icon.png   OK_Icon.png
state     OK_Icon.png    
city OK_Icon.png        
profileURL OK_Icon.png OK_Icon.png OK_Icon.png   OK_Icon.png
*Extracted from other fields

 

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

Tags

This page has no custom tags.
This page has no classifications.

Comments

You must to post a comment.

Attachments