Imported Posts. salesforce Social Studio API
Hirdetés
Hirdetés
CHAPTER 9
Imported Posts
In this chapter ...
•
Use this endpoint to retrieve all brand posts and associated metrics. These posts could include any posts created within Social Studio or imported to Social Studio after posting on the social network itself. Make sure to include the specific metric parameters you want returned for the posts.
Retrieve the Number of Comments on Posts
Retrieve the number of comments on a post using the following call:
POST /v1/importedposts
cURL Example
curl -X POST -H "access_token: your_access_token" -H "Content-Type: application/json"
'https://api.socialstudio.radian6.com/v1/importedposts?startDate=1136500800&endDate=1437105599&metrics=comments'
62
Imported Posts Retrieve Posts & Metrics
Retrieve Posts & Metrics
This method retrieves posts and their metrics imported to a workspace.
/v1/importedposts
HTTP Method
GET
Request Parameters
None
Query Parameters
*workspace* - integer value indicating the workgroup
*startDate* - date value indicating the start date from which to retrieve posts (required)
*endDate* - date value indicating the end date from which to retrieve posts (required)
*network* - string value indicating social network for post:
*all* (default)
*facebook*
*twitter*
*linkedin*
*gplus*
*youtube*
*instagram*
*socialProperty* - string values (in a comma-delimited list) indicating the social properties from which to retrieve the post (defaults to all social properties included in workspace)
*socialAsset* - string value indicating the Social Account Set ID from a workspace (defaults to all social accounts included in workspace)
*metrics* - string values (in a comma-delimited list) included in the response:
*facebook*
*likes*
*comments*
*shares*
*reach*
*organic_reach*
*viral_reach*
*paid_reach*
*fan_reach*
*non_fan_reach*
*fan_paid_reach*
*engagement*
*clicks*
*engagement_rate*
*twitter*
*retweets*
*replies*
63
Imported Posts Retrieve Posts & Metrics
*favorites*
*link_clicks*
*engagement*
*engagement_rate*
*linkedin*
*likes*
*comments*
*link_clicks*
*engagement*
*gplus*
*plusone*
*reshares*
*comments*
*link_clicks*
*engagement*
*youtube*
*views*
*likes*
*dislikes*
*comments*
*link_clicks*
*engagement*
*instagram*
*likes*
*comments*
*pinterest*
*likes*
*comments*
*repins*
*link_clicks*
*labels* - string value (in a comma-delimited list) indicating labels to use in filter
*type* - string value indicating media type to use in filter
*orderBy* - string value indicating parameter used to sort results (defaults to date)
*order* - string value indicating display direction for retrieved content (defaults to
DESC):
*DESC* - descending order (default)
*ASC* - ascending order
*page* - integer value indicating which page to display from retreived data (defaults to
1)
*perpage* - integer value indicating how many results to include in a page (defaults to
10)
*filter* - string value indicating publish status of post (defaults to unpublished)
Request Parameter Example
GET /v1/importedposts
Sample Request
The call below retrieves all imported posts from a specified workspace:
GET /v1/importedposts?workspace=1
64
Imported Posts Retrieve Posts & Metrics
The call below retrieves all imported Facebook posts from a specified workspace:
GET /v1/importedposts?workspace=1&network=facebook
The call below retrieves all imported Facebook posts from a specified workspace with specified metrics:
GET /v1/importedposts?workspace=1&network=facebook&metrics=likes,comments
The call below retrieves all imported Facebook posts from a specified workspace with specified metrics:
GET /v1/importedposts?workspace=1&network=facebook&metrics=likes,comments&orderBy=comments
Sample Response
Each imported post includes the following properties:
*id* - string value indicating ID of imported content
*socialAsset* - string value indicating ID of social asset
*socialProperty* - string value indicating ID of social property
*slug* - string value of slug for imported content
*assets* - array of information on assets within imported content
*id* - numeric value including ID for imported asset
*created* - timestamp value indicating asset creation data
*metadata* - string value including metadata associated with imported asset
*post_id* - string value including ID for post associated with asset
*type* - integer value indicating type of asset
*1* - Album
*2* - Image
*3* - Link
*4* - Question
*5* - Video
*updated* - timestamp value indicating asset updating data
*url* - string value including URL for asset
*date* - timestamp value indicating date for content creation
*message* - string value including message of content
*network* - string value including social network used for content
*targeting* - string value indicating targeting for content
*labels* - string value indicating labels for content
*type* - string value indicating type of content within social network (such as update)
*socialAssetName* - string value including name of content from social network
*blogPostId* - string value indicating ID of associated blog post
*metrics* - array of information about social content analytics
*likes* - integer value of social network likes
*comments* - integer value of social network comments
A successful call returns posts from all networks in last seven days in descending order:
{
"status": true,
"response": [
{
"id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
65
Imported Posts Retrieve Posts & Metrics
"assets": {
"id": 46,
"created": "2013-08-12T10:48:28-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"type": 3,
"updated": "2013-08-12T10:48:28-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-13 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234
},
{
"id": "b93ab12e-37cd-4344-bffa-3a59f5053580",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": [ ],
"date": "2013-08-12 15:29:40",
"message": "yahoo.com",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234
},
{
"id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 47,
"created": "2013-08-12T10:48:29-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"type": 3,
66
Imported Posts Retrieve Posts & Metrics
"updated": "2013-08-12T10:48:29-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-12 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
}
...
],
"meta": {
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234
"total": 6,
"perpage": 10,
"current": 1,
"prev": "",
"next": ""
}
}
A successful call returns posts from Facebook in last seven days in descending order:
{
"status": true,
"response": [
{
"id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 46,
"created": "2013-08-12T10:48:28-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"type": 3,
"updated": "2013-08-12T10:48:28-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-13 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234
67
Imported Posts Retrieve Posts & Metrics
},
{
"id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 47,
"created": "2013-08-12 10:48:29",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
}
...
],
"meta": {
"total": 16,
"perpage": 10,
"current": 1,
"prev": "",
"next": ""
}
"post_id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"type": 3,
"updated": "2013-08-12T10:48:29-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-12 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234
}
A successful call returns posts from Facebook in last seven days in descending order with metrics:
{
"status": true,
"response": [
{
"id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 46,
"created": "2013-08-12T10:48:28-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
68
Imported Posts Retrieve Posts & Metrics
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"type": 3,
"updated": "2013-08-12T10:48:28-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-13 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234,
"metrics": {
"likes": 300,
"comments": 400
}
},
{
"id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 47,
"created": "2013-08-12T10:48:29-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"type": 3,
"updated": "2013-08-12T10:48:29-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-12 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234,
"metrics": {
"likes": 100,
"comments": 800
}
}
69
Imported Posts Retrieve Posts & Metrics
...
],
"meta": {
"total": 16,
"perpage": 10,
"current": 1,
"prev": "",
"next": ""
}
}
A successful call returns posts from Facebook in last seven days sorted by comments in descending order with metrics:
{
"status": true,
"response": [
{
"id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
"id": 46,
"created": "2013-08-12T10:48:28-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "35db3b27-edd5-4d35-8ef7-574b0f483524",
"type": 3,
"updated": "2013-08-12T10:48:28-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-13 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234,
"metrics": {
"likes": 300,
"comments": 800
},
"blogPostId": 1234
},
{
"id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"socialAsset": "200012913364042",
"socialProperty": 8307,
"slug": "/Buddy-The-Dog/200012913364042",
"assets": {
70
Imported Posts Retrieve Posts & Metrics
"id": 47,
"created": "2013-08-12T10:48:29-0400",
"metadata": "{\"link_type\":\"link\",\"title\":\"CRM and Cloud Computing
To Grow Your Business -
Salesforce.com\",\"caption\":\"http://Salesforce.com\",\"description\":\"You can change stuff here\",\"images\":[\"http://www.sfdcstatic.com/common/assets/img/logo-company.png\"],\"image_index\":0,\"thumbnail\":true,\"share_link\":false,\"url\":\"http://Salesforce.com\",\"video_src\":null,\"type\":\"link\"}",
"post_id": "9bc25322-49ca-4b9c-ae81-20ff1b593edf",
"type": 3,
"updated": "2013-08-12T10:48:29-0400",
"url": "http://Salesforce.com"
},
"date": "2013-08-12 09:45:03",
"message": "Salesforce.com is cool!",
"network": "facebook",
"targeting": [ ],
"labels" : [ ],
"type": "status",
"socialAssetName": "Buddy - The Dog",
"blogPostId": 1234,
"metrics": {
"likes": 100,
"comments": 600
}
}
...
],
"meta": {
"total": 16,
"perpage": 10,
"current": 1,
"prev": "",
"next": ""
}
}
71
Letöltés
Hirdetés