Table of contents
Description
The method retrieves the feeds of a specified feed stream.
Request URL
http[s]://socialize.gigya.com/socialize.getFeed
Parameters
| Required | Name | Type | Description |
| Optional | feedID | string | The purpose of this parameter is to support multiple feed streams with different feeds on the same domain. You may give a different feedID to different feed streams in your site. The method retrieves only User Actions that are published with the same feedID (please refer to the same parameter in the showShareUI and the publishUserAction methods). If this parameter is not set, the method retrieves User Actions that are published without feedID (default). |
| UID | string | You may call this method with or without having a currently logged-in user. If there is a logged-in user pass his unique ID (the UID you received from Gigya after logging-in this user). * The UID parameter is not required when you call this method through one of the following interfaces: Android SDK, iOS SDK or if you are using an external OAuth2 SDK. Note: If you are using account linking then the UID would be your site user ID. To learn more about Social Login with account linking (best practice), please refer to the Social Login Implementation guide. | |
| limit | integer | The number of feed items to retrieve. The maximum, which is also the default, is 50. | |
| startTS | long | Timestamp, in Unix time format (i.e. the number of seconds since Jan. 1st 1970). The method retrieves feed items that were created later than this timestamp. By default the method retrieves all items, since the first. | |
| endTS | long | Timestamp, in Unix time format (i.e. the number of seconds since Jan. 1st 1970). The method retrieves feed items that were created before this timestamp. By default the method retrieves all items, up to the latest. | |
| groups | string | A comma delimited list of feed stream groups to retrieve. The optional group names are: 'everyone', 'friends', 'me'. The default value of this parameter is: "everyone,friends,me" (i.e. retrieves all the groups). Each feed is posted to one or more of these groups according to the privacy settings (please refer to the privacy parameter in the showShareUI and the publishUserAction methods). | |
| format | string | Determines the format of the response. This parameter is required when using the REST API directly, and irrelevant when using one of our SDKs. The options are:
|
|
| callback | string | This parameter is relevant only when the format parameter is set to jsonp (see above). In such case this parameter should define the name of the callback method to be called in the response, along with the jsonp response data. | |
| httpStatusCodes | Boolean | The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if occurs. | |
Authorization Parameters
Each REST API request must contain identification and authorization parameters.
Note: the authorization parameters are required only if you are using the REST API directly. If you are using one of Gigya's SDKs then these parameters are not required, since the SDK implements the authorization method internally.
The set of required parameters is dependent on your selected method of authorization. There are two options:
- If you are conforming with the OAuth 2.0 standard, you will need to Pass an Access Token. For more information, please read the Using Gigya's REST API in compliance with OAuth 2.0 guide.
- If you are using Gigya's proprietary authorization method, you will need to pass the parameters specified here. Or, if you are making a call over HTTPS then you may pass the secret parameter instead of the timestamp, nonce and sig parameters. For more information, please read the Using Gigya's REST API with our proprietary authorization method guide.
Response Data
| Field | Type | Description |
| errorCode | integer | The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table. |
| errorMessage | string | A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error. |
| errorDetails | string | This field will appear in the response only in case of an error and will contain the exception info, if available. |
| callId | string | Unique identifier of the transaction, for debugging purposes. |
| everyone | JSON Object | The feed stream in the 'everyone' group (see the 'groups' parameter above). The JSON object includes 2 fields:
|
| friends | JSON Object | The feed stream in the 'friends' group (see the 'groups' parameter above). The JSON object includes 2 fields:
|
| me | JSON Object | The feed stream in the 'me' group (see the 'groups' parameter above). The JSON object includes 2 fields:
|
| nextTS | long | The timestamp of the latest returned feed item. This may be useful for the next time you call this method: you may use this field as the value of the 'startTS' parameter of the next getFeed request, thus retrieving only newer items and avoid retrieving the same items again. The timestamp is in Unix time format (i.e. the number of seconds since Jan. 1st 1970). |
Feed Item JSON Object
| Field | Type | Description |
| action | UserAction JSON Object | A JSON Object representing the action that the user took, which produced this feed item. The UserAction JSON is equivalent to the UserAction object in the JavaScript API. See further details there. |
| timestamp | long | Feed item creation timestamp, in Unix time format (i.e. the number of seconds since Jan. 1st 1970). |
| sender | JSON Object | An object representing the user whose action generated this feed item. The sender object includes the following user data fields:
|
Note: A field that does not contain data, will not appear in the response.
Response Example
{
"everyone": {
"items": [{
"action": {
"titleTemplate": "",
"actorNickame": "",
"actorUID": "",
"actionName": "is going to",
"templateFields": {},
"targets": [],
"images": [],
"actionData1": "",
"actionData2": "",
"iconURL": "",
"title": "What is the black widow on counterfeit island?",
"linkBack": "http://wiki.answers.com/Q/What_is_the_black_widow_on_counterfeit_island",
"userMessage": "Please answer #8 [2011_06_20_08_17_22]...",
"description": "The Black Widow is a notorious female art thief, who has her eyes set on stealing the famous painting
The Scream. Although her henchman succeeds, you will eventually catch up with both of them.",
"actionLinks": [{
"text": "Read More",
"href": "http://www.gigya.com/site/content/socialize.aspx"}],
"mediaItems": [{
"type": "image",
"src": "http://www.butterflypages.com/albums/icons/bpicons-05.gif",
"href": "http://www4.in.tum.de/~ballarin/data/c540/html/corpus-5.html"}]
},
"timestamp": 1308557903890,
"sender": {
"photoURL": "http://l.yimg.com/a/i/identity2/projkhb.png",
"profileURL": "http://pulse.yahoo.com/_7QG2OJ45WI",
"loginProvider": "yahoo",
"name": "Craig Edge"
}
},
{
"action": {
"titleTemplate": "",
"actorNickame": "",
"actorUID": "",
"actionName": "is going to",
"templateFields": {},
"targets": [],
"images": [],
"actionData1": "",
"actionData2": "",
"iconURL": "",
"title": "What is the black widow on counterfeit island?",
"linkBack": "http://wiki.answers.com/Q/What_is_the_black_widow_on_counterfeit_island",
"userMessage": "Please answer #8 [2011_06_20_08_17_22]...",
"description": "The Black Widow is a notorious female art thief, who has her eyes set on stealing the famous painting
The Scream. Although her henchman succeeds, you will eventually catch up with both of them.",
"actionLinks": [{
"text": "Read More",
"href": "http://www.gigya.com/site/content/socialize.aspx"}],
"mediaItems": [{
"type": "image",
"src": "http://www.butterflypages.com/albums/icons/bpicons-04.gif",
"href": "http://www4.in.tum.de/~ballarin/data/c540/html/corpus-4.html"}]
},
"timestamp": 1308557877268} ],
"ready": true
},
"me": {
"items": [],
"ready": true
},
"friends": {
"items": [{
"action": {
"titleTemplate": "",
"actorNickame": "",
"actorUID": "",
"actionName": "watched this video",
"templateFields": {},
"targets": [],
"images": [],
"actionData1": "",
"actionData2": "",
"iconURL": "",
"title": "Scrubs - Episode Commentary",
"linkBack": "http://abc.go.com/watch/commentary/scrubs/157146/246782/sve_240/our-stuff-gets-real",
"userMessage": "",
"description": "Leila Strachan - Writer: Before joining "Scrubs" Leila worked on ABC's "The Goode
Family", an animated show created by Mike Judge, as well as Comedy Central's "Lil' Bush."",
"actionLinks": [],
"mediaItems": [{
"type": "image",
"src": "http://ll.static.abc.com/c/shows/scrubs/social/115x115_abc_avatar.png",
"href": "http://abc.go.com/watch/commentary/scrubs/157146/246782/sve_20/our-stuff-gets-real"}]
},
"timestamp": 1297280090429}],
"ready": true
},
"nextTS": 1308557903890,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "b797cb402a774d6da43e8f7487770ce1"
}
Comments