Definition
The getSocialHistory API Command returns the social data history for the campaign.
Cost
Using this command consumes 1 credit for each data point extracted.
Module
The command is included in the Campaign API Module and will only consume credits assigned for Campaign API Operations.
Parameters
| campaignId | The ID Number of the campaign. |
| siteId | The ID Number of the site you will import links to. |
| dateFrom | The first date from which to begin extraction. *if no value inserted, the default is the first date found in the database. |
| dateTo | The last date from which to begin extraction. |
| date | Extracting links from a fixed date. |
| url | Displays the history only for this URL. If parameter is not mentioned, the application will extract the history of all the campaign. |
Input URL Example
http://api.cognitiveseo.com/command.php?apiKey=your_api_key&command=getSocialHistory&campaignId=7&siteId=39&dateFrom=2014-02-02
Output Example
Running this command will result in the following JSON output:
{
"api": "cognitiveSEO API",
"data": {
"status": "success",
"data": {
"2013-12-23": {
"fblikes": "2194",
"fbShares": "974",
"fbComments": "213",
"fbTotal": "3381",
"twitter": "2608",
"googlePlus": "2560"
},
"2013-12-29": {
"fblikes": "2525",
"fbShares": "1070",
"fbComments": "248",
"fbTotal": "3843",
"twitter": "2767",
"googlePlus": "2578"
}
},
"credits": 56
},
"time": 1.351
}
Output Details
| status | The status of the command (success or error). |
| url | The URL for the link. |
| fbLikes | Total number of Facebook likes. |
| fbShares | Total number of Facebook shares. |
| fbComments | Total number of Facebook comments. |
| fbTotal | Total Facebook activity. |
| Total number of Twitter shares. | |
| googlePlus | Total number of googlePlus shares. |
| credits | The credit cost of the command. |
| time | The time it took to process the command. |