The method retrieves the comments made by the logged in user.
Note: This method is also supported in our REST API. If you wish to execute this method from your server, please refer toREST API > comments.getUserComments.
The following table lists the available parameters:
A reference to a callback function. Gigya calls the specified function along with the results of the API method when the API method completes.
The callback function should be defined with the following signature: functionName(Response).
The "Response Object Data Members" table below provides specification of the data that is passed to the callback function.
|||categoryID||string||The identifier of the comments category by which to filter the retrieved comments.|
The identifier of the comments stream by which to filter the retrieved comments.
* If using a streamID you must also supply a categoryID, otherwise it will be ignored.
A developer-created object that is passed back unchanged to the application as one of the fields in the response object.
|||includeReplies||Boolean||Indicates whether to include comment replies in the response.|
|||includeStreamInfo||Boolean||This parameter specifies whether to include a stream information object in the response. The default is 'false' . When set to 'true' the response to the method will include the StreamInfo object.|
|||includeUID||Boolean||Indicates whether the UID of the commenter will be included in the returned object per comment. The default value is 'false'.|
|||limit||integer||The maximum number of comments to retrieve. The default value is 10.|
|||sort||string||The comments may be sorted in one of the following orders:|
|||start||string||Defines what should be the starting point of the comments to retrieve. The purpose of this parameter is pagination of the comments. Use the limit parameter to define how many comments per page. For the first page don't set the start parameter. The response includes a next field, which is a pointer to the starting point of the next page. Set the start parameter with the value of the next field received in the response of the previous getUserComments request.|
|||tag||string||The tag by which to filter the retrieved comments.|
Response Object Data Members
|An array listing the comments. Each comment is represented by a JSON Comment object. In addition to the regular fields of the Comment object, the following fields are returned in the response of this method:|
|commentCount||integer||The number of returned comments.|
|next||string||A pointer to the starting point of the next comments page. The purpose of this field is pagination of the comments. Use this field as the value of the 'start' parameter of the next getUserComments request, thus retrieving the next comments and avoid retrieving the same comments again.|
|hasMore||Boolean||Specifies whether there are more comments that were not returned within this response.|