Table of contents
Description
The method allows to see the content (URLs) most shared on a site in the recent defined time period (up to 7 days).
Request URL
http[s]://socialize.gigya.com/socialize.getTopShares
Parameters
| Required | Name | Type | Description |
| Required | age | string | The age of the share in days, up to 7 days. |
| Optional | tag | string | The tag by which to filter the list of shares. The default is an empty string. |
| limit | integer | The number of rows to retrieve. The default is 100 rows. The maximum allowed value is 1000. |
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. |
| topShares | array | An array of JSON objects that include:
|
Response Example
{
"topShares": [
{
"url": "http://vimeo.com/24400434",
"count": 17
},
{
"url": "http://www.youtube.com/watch?v=jqxENMKaeCU",
"count": 2
},
{
"url": "http://www.cnn.com",
"count": 2
},
{
"url": "http://www.gigya.com",
"count": 1
},
{
"url": "http://www.nasa.com,http://www.nasa.com",
"count": 1
},
{
"url": "http://www.gigya.com,http://www.gigya.com",
"count": 1
}
],
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "ed9e8fb1e68c46218fc128ee2a5a30e0"
}
Comments