Was this article helpful?

socialize.getFeed

Last modified 10:52, 10 Feb 2014

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:
  • json
  • jsonp - if the format is jsonp then you are required to define a callback method (see parameter below).
  • xml (default) - Deprecated. We do not support XML format anymore, but it is the default due to backwards compatibility. Please set the format parameter to either json or jsonp.
  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.

Please refer to the Authorization Parameters section for details. 

 

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:
  • items - an array of feed item objects.
  • ready - Boolean. This field is always 'true' (this field is relevant only for the 'friends' group, but is available also in the 'everyone' group for the purpose of uniformity).
friends  JSON
Object
The feed stream in the 'friends' group (see the 'groups' parameter above). The JSON object includes 2 fields:
  • items - an array of feed item objects.
  • ready - Boolean. If this field is 'true', the data is available. Otherwise, the data is pending, and you may wait a while and retry retrieving the 'friends' group again later. Retrieving the list of friends from the different providers may be a lengthy operation. Gigya begins retrieving the list to its cache immediately after the user logs in but if you call this method too soon after the login, the friends list may not be available yet.
me JSON
Object
The feed stream in the 'me' group (see the 'groups' parameter above). The JSON object includes 2 fields:
  • items - an array of feed item objects.
  • ready - Boolean. This field is always 'true' (this field is relevant only for the 'friends' group, but is available also in the 'me' group for the purpose of uniformity).
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:
  • name
  • loginProvider
  • profileURL
  • photoURL
Note: the sender object availability depends on the privacy settings of the feed item.

Note: A field that does not contain data, will not appear in the response.

 

Response Example

{
        "everyone": {
            "items": [{
                "action": {
                    "actorNickame": "",
                    "actorUID": "",
                    "actionName": "is going to",
                    "targets": [],
                    "images": [],
                    "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": {
                    "actorNickame": "",
                    "actorUID": "",
                    "actionName": "is going to",
                    "targets": [],
                    "images": [],                       
                    "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": {
                    "actorNickame": "",
                    "actorUID": "",
                    "actionName": "watched this video",
                    "targets": [],
                    "images": [],
                    "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"
    }
Was this article helpful?
Pages that link here
Page statistics
7915 view(s) and 3 edit(s)
Social share
Share this page?

Tags

This page has no custom tags set.

Comments

You must to post a comment.

Attachments