App SDK 2.0 Reference

Functions

assignItem(data)

Assign an item from an app to the Hootsuite Assignments Manager. When an assignment changes in Hootsuite the app can receive updates by setting the Assignments Callback URL in the Developer Portal. The Assignments Callback URL must be set otherwise the end user will receive an error message.

An item can be either a message from a network supported natively in Hootsuite or a social network unsupported by Hootsuite. When an app assigns an item that is not supported natively by Hootsuite, the end user will not be able to engage with the message in the Assignments Manager and Analytics will not be calculated. When an assignment is created or updated, the app should display the appropriate CSS (refer to the template for styles).

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Attributes Description
socialNetworkMessageId string <optional>

External message ID used by the social network for this message. Used when an item is a message from a Hootsuite natively supported network.

socialNetworkType string <optional>

The social network type of the message. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM". Used when an item is a message from a Hootsuite natively supported network.

messageType string <optional>

The type of message. Valid values are: "STATUS_UPDATE" for Twitter, "POST" and "COMMENT" for Facebook, "POST" for Instagram. Used when an item is a message from a Hootsuite natively supported network.

messageId string

The app defined message identifier that is used to correlate assignment updates.

messageAuthor string

The message author's name. Used when an item is a message from a social network that is unsupported by Hootsuite.

messageAuthorAvatar string

The author's avatar URL. Must be HTTPS. Used when an item is a message from a social network that is unsupported by Hootsuite.

message string

The message text. Used when an item is a message from a social network that is unsupported by Hootsuite.

timestamp string <optional>

The time the message was published to the social network as a Unix timestamp. Used when an item is a message from a social network that is unsupported by Hootsuite.

Source:
Example
//A message on a social network natively supported by Hootsuite
hsp.assignItem({
    socialNetworkMessageId: "770648855507599360",
    socialNetworkType: "TWITTER",
    messageType: "STATUS_UPDATE",
    messageId: "770648855507599360"
    message: "30-in-30: With few off-season changes, the @Penguins like their chances of a repeat. http://s.nhl.com/6014B4XzY"
});

//A message on a social network unsupported by Hootsuite
hsp.assignItem({
    messageId: "42",
    messageAuthor: "DeepThought85",
    messageAuthorAvatar: "https://deep.thought/avatar.jpg",
    message: "What is answer to life the universe and everything?",
    timestamp: "1462466950"
});

attachFileToMessage(data)

Attach a file to the compose message box. Both images and files can be attached to a message. Images will be added as attachments whereas files upload to Ow.ly and a shortened link that redirects to the file is added to the message text.

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Attributes Description
url string

The URL of the file to attach. Must be HTTPS.

name string <optional>

The name of the file. This will be used as the filename when a file is uploaded to Ow.ly.

extension string

The file extension. Valid image extensions: jpg, jpeg, gif, png. Valid document extensions: doc, docx, pdf, xls, xlsx, ppt, pptx, odt, ods, odp, txt, rtf, csv, psd, psb, ai, eps, fla, mp3

timestamp int

The current Unix time, used for authentication.

token string

SHA512(user_id + timestamp + url + secret)

Source:
Example
hsp.attachFileToMessage({
    url: "https://hootsuite.com/var/hootsuite/storage/images/media/images/media-kit/office-photos/hq2/53153-2-eng-US/hq2.jpg",
    name: "hq2.jpg",
    extension: "jpg",
    timestamp: 1472580556,
    token: "5df51ff8a619853d947bbdd081551736642f26bf600bac9d3a5f5d176f45f2dd572e6277614d340993fe74d88ed33b96a848238ffaa64459e386efdcec2ba7b4"
});

attachMedia(data)

Attach media uploaded using the Hootsuite REST API to the compose message box.

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Description
mediaId string

The Hootsuite Media ID. The Media ID is returned when media is uploaded using the Hootsuite REST API.

timestamp string

The current Unix time, used for authentication.

token string

SHA512(user_id + timestamp + mediaId + secret)

Source:
Example
hsp.attachMedia({
    id: "aHR0cHM6Ly9ob290c3VpdGUtdmlkZW8uczMuYW1hem9uYXdzLmNvbS9kZXYvNTMzOTk0N18zYzc1YTY1Yy1lYTEzLTQ0ZjItYWM2MS01YjljZDA0NDE1NTAubXA0",
    timestamp: 1472580556,
    token: "5df51ff8a619853d947bbdd081551736642f26bf600bac9d3a5f5d176f45f2dd572e6277614d340993fe74d88ed33b96a848238ffaa64459e386efdcec2ba7b4"
});

bind(eventName, callback)

Binds an event to a callback function.

Parameters:
Name Type Description
eventName string

The event name. Valid events names: "sendtoapp", "refresh", "sendassignmentupdates", "savemessagetoapp".

callback sendtoapp | refresh | sendassignmentupdates | savemessagetoapp

Function to handle the callback. The function's parameters are determined by the event type, see each event type for the corresponding data format.

Source:
Example
hsp.bind(
    'sendtoapp',
    function (data) {
        //callback handler
    }
);

clearStatusMessage()

Clears currently visible status message on the user's dashboard.

Source:
Example
hsp.clearStatusMessage();

closeCustomPopup(sdkApiKey, pid)

Close a modal popup window. This function is called from the popup IFrame itself. Please note:

1) Event binding functions are not available in the custom popup.

2) Your IFrame page in the modal popup window and the app page should share the same domain.

3) You should not call hsp.init() again in the modal IFrame page. If required, you can use JavaScript to communicate between the popup and an app like this: window.parent.frames["<%= sdkApiKey %>_<%= pid %>"].location.reload();

Parameters:
Name Type Description
sdkApiKey string

The app's SDK API key which can be retrieved from the Developer Portal.

pid string

The pid is associated with each unique user installation of an app (or plugin). You can get the pid of each app stream from the url request your server gets. For example: https://demo.ca/stream.html?lang=en&theme=blue_steel&timezone=-25200&pid=60956&uid=136

Source:
Example
hsp.closeCustomPopup(3x6zyxglj36s4ockg8c8s0k4o3ibhago7n4','82802');

composeMessage(message, params)

Creates a message in the compose message box. If your post contains an image or file, use hsp.attachFileToMessage in conjunction.

Parameters:
Name Type Description
message string

The message text.

params Object

The message parameters.

Properties
Name Type Description
scheduleTimestamp int | boolean

A flag to schedule the message. The schedule time can be passed as Unix time. If true is passed in, then the scheduler will open with no default time. Defaults to false.

twitterReplyToId string

The Twitter Post ID of the Twitter message being replied to. The message text should include the original author's Twitter handle. See example below.

shortenLinks boolean

A flag to shorten all links in the message text using Ow.ly.

Source:
Example
hsp.composeMessage(
    "The world's most widely used social relationship platform: https://hootsuite.com @JoeYing_1986",
    {
        shortenLinks: true,
        timestamp: 1460520580,
        twitterReplyToId: '627186559909900288'
    }
);

customUserInfo(data)

Open a user info popup window populated with custom information from the app.

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Description
fullName string

User's full name.

screenName string

User's Twitter handle

avatar string

User's avatar image URL. Must be HTTPS.

profileUrl string

URL to open when the user clicks the avatar image.

userLocation string

User's location.

bio string

User's bio.

extra array

Custom fields that are rendered at the bottom of the popup.

Properties
Name Type Description
item Object

A custom field.

Properties
Name Type Description
label string

Field label.

value string

Field value.

links array

Custom links that are rendered at the bottom of the popup.

Properties
Name Type Description
item Object

A custom link.

Properties
Name Type Description
label string

Link Name.

url string

Link URL.

Source:
Example
hsp.customUserInfo({
    fullName: "David Chan",
    screenName: "@chandavid",
    avatar: "https://placehold.it/30x30/444",
    profileURL: "https://twitter.com/chandavid",
    userLocation: "Vancouver, BC",
    bio: "JavaScript/web/martini developer. Working on @Hootsuite. Making by breaking.",
    extra: [
        {
            label: "Age",
            value: "Unknown"
        },
        {
            label: "Gender",
            value: "Male"
        }
    ],
    links: [
        {
            label: "Hootsuite",
            url: "https://hootsuite.com"
        },
        {
            label: "Blog",
            url: "https://blog.hootsuite.com"
        }
    ]
 });

getAuth(callback)

Get user authentication information.

Parameters:
Name Type Description
callback getAuthCallback

Callback handler for hsp.getAuth(...)

Source:
Example
hsp.getAuth(function(data){
    //callback handler
    console.log(data.i);        // @bypasshook
    console.log(data.ts);       // @bypasshook
    console.log(data.token);    // @bypasshook
});

getData(callback)

Retrieve data saved for an end user's instance of an app. The hsp.saveData(...) and hsp.getData(...) are designed to be used in conjunction to retain user settings from one session to another (e.g. user tokens, unique settings, and filters set by the user in the app). The methods are invoked on a per app component basis using the pid. The data can be saved in any string format.

Parameters:
Name Type Description
callback getDataCallback

Callback handler for getData(...)

Source:
Example
hsp.getData(function(data){
    //callback handler
    console.log(data);      // @bypasshook
});

getMemberInfo(callback)

Retrieve the authenticated user's Team information. Use in conjunction with the other assignments methods and callbacks (assignItem, resolveItem, Assignment Event Request). Users must assign messages to a Team or Team Member. getMemberInfo will return the users Teams and Team Members in order to create the assignment. We recommend calling this method after hsp.init.

Parameters:
Name Type Description
callback getMemberInfoCallback

Callback handler for getMemberInfo(...)

Source:
Example
hsp.getMemberInfo(function(data){
    //callback handler
    console.log(data.userId);  //5339913            // @bypasshook
    console.log(data.teamIds); //[151906,154887]    // @bypasshook
});

getTwitterAccounts(callback)

Retrieve a list of all Twitter account IDs the authenticated user has access to in their Hootsuite account.

Parameters:
Name Type Description
callback getTwitterAccountsCallback

Callback handler for getTwitterAccounts(...)

Source:
Example
hsp.getTwitterAccounts(function(data){
    //callback handler
    console.log(data[0]); //3307435869     // @bypasshook
});

init(data)

Initializes the connection between the app and the Hootsuite dashboard and loads any theme CSS files.

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Description
useTheme boolean

A flag to determine whether to use the default Hootsuite theme for the app.

sendToAppDisableList array

Hides the stream menu item reading "Send to {app name}" from specific streams types. Valid values: 'facebook', 'twitter', 'instagram' and 'youtube'.

sendProfileToAppDisableList array

Deprecated. Hides the profile menu item reading "Send to {app name}" from specific streams types. Valid values: 'facebook' and 'twitter'.

param.callback initCallback

Callback handler for init(...)

Source:
Example
hsp.init({
    useTheme: true,
    sendToAppDisableList: ['facebook', 'instagram'],
    sendProfileToAppDisableList: ['twitter'],
    callback: function (data) {
        //callback handler
        console.log(data); //"No Error"     // @bypasshook
    }
});

resolveItem(data)

Resolve an assignment made from an app within the App Stream.

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Description
assignmentId string

The Hootsuite Assignment ID. The Assignment ID is returned via the API Callback Webhook and the sendAssignmentUpdatesCallback event.

Source:
Example
hsp.resolveItem({
    assignmentId: "7775154"
});

retweet(id, screenNameopt)

Open a retweet dialog process in the Hootsuite dashboard.

Parameters:
Name Type Attributes Description
id string

Twitter message ID to retweet.

screenName string <optional>

Twitter handle to retweet with.

Source:
Example
hsp.retweet(
    "369937169529708544",
    "Hootsuite"
);

saveData(data, callback)

Save data for an end user's instance of an app. The hsp.saveData(...) and hsp.getData(...) are designed to be used in conjunction to retain user settings from one session to another (e.g. user tokens, unique settings, and filters set by the user in the app). The methods are invoked on a per app component basis using the pid. The data can be saved in any string format.

Parameters:
Name Type Description
data Object

Data to be saved

callback saveDataCallback

Callback handler for saveData(...)

Source:
Example
hsp.saveData({
    username: "Joe Ying",
    email: "joe.ying@hootsuite.com"
}, function (data) {
    //callback handler
})

showCustomPopup(data)

Open a modal popup window containing an IFrame. Please note:

1) Event binding functions are not available in the custom popup.

2) Your IFrame page in the modal popup window and the app page should share the same domain.

3) You should not call hsp.init() again in the modal IFrame page. If required, you can use JavaScript to communicate between the popup and an app like this: window.parent.frames["<%= sdkApiKey %>_<%= pid %>"].location.reload();

Parameters:
Name Type Description
data Object

Input parameters.

Properties
Name Type Attributes Description
url string

IFrame URL. Must be HTTPS.

title string

Title of the popup modal box

w int <optional>

The width of the popup. Range: 300px to 900px. Default: 640px

h int <optional>

The height of the popup. Range: 225px to 500px. Default: 445px

Source:
Example
hsp.showCustomPopup(
    {
        url: "https://sampleapp.com/iframes/popup",
        title: "Sample App Popup",
        w: 800,
        h: 400
    }
);

showFollowDialog(twitterHandle, isFollow)

Open a follow/unfollow popup for the specified Twitter username.

Parameters:
Name Type Description
twitterHandle string

Twitter handle to follow/unfollow. Handles will be sanitized to remove all characters that aren't alphanumeric or underscores.

isFollow boolean

A flag to determine whether to follow/unfollow. Values: "true" to follow, "false" to unfollow.

Source:
Example
hsp.showFollowDialog("hootsuite_help", true);

showImagePreview(src, externalUrlopt)

Open a modal popup window containing an image preview. Use in Stream components only.

Parameters:
Name Type Attributes Description
src string

URL of the image. Must be HTTPS.

externalUrl string <optional>

The URL to open when the user clicks the image.

Source:
Example
hsp.showImagePreview(
    "https://hootsuite.com/var/hootsuite/storage/images/media/images/media-kit/office-photos/hq2/53153-2-eng-US/hq2.jpg",
    "https://hootsuite.com"
);

showLightbox(src)

Open a lightbox popup containing an image preview. Use in Content Source components only.

Parameters:
Name Type Description
src string

URL of the image. Must be HTTPS.

Source:
Example
hsp.showLightbox(
    "https://hootsuite.com/var/hootsuite/storage/images/media/images/media-kit/office-photos/hq2/53153-2-eng-US/hq2.jpg"
);

showStatusMessage(message, type)

Display a status message in the top center of the dashboard. The message is automatically cleared after 3 seconds.

Parameters:
Name Type Description
message string

The message to display. This should be brief, max. 70 characters.

type type

The type of notification to display. Valid values: info (blue background), error (red background), warning (yellow background), success (green background)

Source:
Example
hsp.showStatusMessage(
    "Nice work!",
    "success"
);

showUser(twitterHandle)

Open a user info popup for the specified Twitter username.

Parameters:
Name Type Description
twitterHandle string

Twitter handle.

Source:
Example
hsp.showUser("hootsuite_help");

updatePlacementSubtitle(name)

Update an app stream subtitle.

Parameters:
Name Type Description
name string

The subtitle of the app stream, limited to 35 characters

Source:
Example
hsp.updatePlacementSubtitle("Sample App Stream");

Type Definitions

getAuthCallback(data)

Callback handler for hsp.getAuth(...)

Parameters:
Name Type Description
data Object

The callback data.

Properties
Name Type Description
i int

Hootsuite User ID.

ts int

Current Unix timestamp in UTC.

token string

Secret token generated from SHA512(user_id + timestamp + url + secret).

Source:

getDataCallback(data)

Callback handler for hsp.getData(...)

Parameters:
Name Type Description
data Object

Data saved using hsp.saveData()

Source:

getMemberInfoCallback(data)

Callback handler for hsp.getMemberInfo(...)

Parameters:
Name Type Description
data Object

The callback data.

Properties
Name Type Description
userId int

The authenticated user's Hootsuite member ID.

teamIds array

A list of the authenticated user's Hootsuite team IDs.

Source:

getTwitterAccountsCallback(data)

Callback handler for getTwitterAccounts(...)

Parameters:
Name Type Description
data array

A list of Twitter account IDs the authenticated user has added to their Hootsuite account.

Properties
Name Type Description
twitterId string

An individual Twitter account Id in the array.

Source:

initCallback(data)

Callback handler function for hsp.init(...).

Parameters:
Name Type Description
data string

If the init is successful, the result string is "No Error".

Source:

saveDataCallback(data)

Callback handler for hsp.saveData(...)

Parameters:
Name Type Description
data Object

Data saved using hsp.saveData()

Source:

Events

refresh

Event for hsp.bind('refresh', callback). This event fires when a user clicks the refresh icon within a stream app or as part of a page refresh.

Type:
  • function
Parameters:
Name Type Description
data Object

The event data from the dashboard.

Source:
Example
{}

request

Event for hsp.bind('request', callback). This event fires when another app sends an event to your app.

Type:
  • function
Parameters:
Name Type Description
data Object

The event data from another app.

Properties
Name Type Description
request Object
Properties
Name Type Description
componentId string

The target app component ID

messageType string

The message type as defined by your destination app component

payload Object

The message payload schema is defined by your destination app component

sender Object
Properties
Name Type Description
componentId string

The app component ID of the sender

Source:
Example
{
    "request": {
        "componentId": "1101",
        "messageType": "com.superapp.tweet",
        "payload": {
            "handle": "joeying",
            "content": "Example text content"
        }
    },
    "sender": {
        "componentId": "3433"
    }
}

savemessagetoapp

Event for hsp.bind('savemessagetoapp', callback). This event fires when a user clicks a menu item reading "Send to {app name}" in the save menu of the compose message box.

Type:
  • function
Parameters:
Name Type Description
data Object

The event data from the dashboard.

Properties
Name Type Description
message string

The message object

messageTags Array

The message tags

Properties
Name Type Description
tag Object

A message tag object

Properties
Name Type Description
id int

The message tag ID

name string

The message tag name

attachments Array

The message attachments.

Properties
Name Type Description
attachment Object

An attachment object

Properties
Name Type Description
mimeType string

The MIME type of the attachment

url string

The URL of the attachment

thumbnailUrl string

The thumbnail URL of the attachment

schedule Object

The schedule object

Properties
Name Type Description
isAutoScheduled boolean

A flag to determine whether to auto schedule the message

isSendAlert boolean

A flag to determine whether email alerts are sent when the message is sent

sendDate string

The scheduled send time. E.g. "2016-05-07 15:15:00"

timezone float

The scheduled sent time timezone. E.g. -7 or 5.75

timezoneName string

The timezone name. E.g. "America/Vancouver"

geoLocation Object

The geo location object

Properties
Name Type Description
lat string

The location latitude. e.g. "49.2639773"

long string

The location longitude. e.g. "-123.10467140000002"

facebookTargeting string

The Facebook targeting options applied

linkedinTargeting string

The Linkedin targeting options applied

privacyOption string

The privacy options applied. E.g. "{"FACEBOOK":[{"type":"EVERYONE","id":"EVERYONE","name":"Public","global":1}]}"

selectedSocialNetworks Array

The selected social networks object

Properties
Name Type Description
socialNetwork Object

A social network object

Properties
Name Type Description
type string

The social network type. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM", "YOUTUBE"

userId string

The user id of the social network

username string

The username of the social network

Source:
Example
{
    "message": "A message to send http://ow.ly/OjRL303QGnl",
    "messageBySocialNetworkType": {
        "twitter": "A message to send http://ow.ly/OjRL303QGnl",
        "facebook": "A message to send http://ow.ly/OjRL303QGnl",
        "instagram": "A message to send http://ow.ly/OjRL303QGnl"
    },
    "attachments": [{
        "url": "https://d2jhuj1whasmze.cloudfront.net/photos/original/mGHvD.jpeg",
        "thumbnailUrl": "https://d2jhuj1whasmze.cloudfront.net/photos/thumb/mGHvD.jpg",
        "mimeType": "image/jpeg"
    }],
    "schedule": {
        "isAutoScheduled": true,
        "sendDate": "2017-09-02 12:25:00",
        "isSendAlert": true,
        "timezone": -7,
        "timezoneName": "America/Vancouver"
    },
    "messageTags": [{
        "id": 100168,
        "name": "campaign_code"
    }],
    "geoLocation": {
        "lat": "49.2639631",
        "long": "-123.10462679999998"
    },
    "privacyOptions": "",
    "selectedSocialNetworks": [{
        "type": "TWITTER",
        "userId": "3307435869"
    }]
}

sendassignmentupdates

Event for hsp.bind('sendassignmentupdates', callback). This event fires when an assignment created by your app is updated in Hootsuite.

Type:
  • function
Parameters:
Name Type Description
data Object

The event data from the dashboard.

Properties
Name Type Description
status string

The assignment status. Valid values: "OPEN", "RESOLVED".

assignmentId string

The Hootsuite Assignment ID.

messageId string

The app defined message identifier that is used to correlate assignment updates.

socialNetworkMessageId string

External message ID used by the social network for this message. Used when an item is a message from a Hootsuite natively supported network.

socialNetworkType string

The social network type of the message. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM", "YOUTUBE". Used when an item is a message is from a Hootsuite natively supported network.

messageType string

The type of message. Valid values are: "STATUS_UPDATE" for Twitter, "POST" and "COMMENT" for Facebook, "POST" for Instagram. Used when an item is a message is from a Hootsuite natively supported network.

toName string

The name of the Hootsuite user or team the assignment is assigned to.

createdDate string

The date the assignment was created. e.g "yyyy-mm-dd hh:mm:ss" in UTC.

modifiedDate string

The date the assignment was modified. e.g "yyyy-mm-dd hh:mm:ss" in UTC.

Source:
Example
{
    "status": "RESOLVED",
    "assignmentId": "463264434",
    "messageId": "42",
    "socialNetworkMessageId": "770648855507599360",
    "socialNetworkMessageType": "TWITTER",
    "messageType": "STATUS_UPDATE",
    "toName": "Joe Ying",
    "createdDate": "2016-03-03 11:57:33",
    "modifiedDate": "2016-03-04 10:54:32"
}

sendtoapp

Event for hsp.bind('sendtoapp', callback). This event fires when users click on the menu item reading "Send to {app name}" in Twitter, Facebook, Instagram and YouTube message streams. Not all Social Networks (e.g. Twitter) provide data for the fields listed below. In such cases, if needed, the data will need to be manually retrieved.

Type:
  • function
Parameters:
Name Type Description
data Object

The event data from the dashboard. The data includes the post and the user who created the post.

Properties
Name Type Description
post Object

A posted message received from the dashboard.

Properties
Name Type Description
network string

The social network type of the message. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM", "YOUTUBE"

id string

The external post ID

parentId string

The external post ID of the message's parent post. This field will be null if the message is not a comment

datetime string

The post datetime in ISO-8601 datetime format. e.g. "2015-05-07T17:15:54.000Z"

href string

The external post url. This field will be null if the message does not have an associated URL (for example, Instagram comments)

source string

The source of the post. e.g. Hootsuite

counts Object

The post's engagement

Properties
Name Type Description
likes int

Total number of post likes

shares int

Total number of post shares

replies int

Total number of post replies

content Object

The post content object

Properties
Name Type Description
body string

The content

bodyhtml string

The content with HTML

user Object

The post author.

Properties
Name Type Description
userid string

The author's external user ID

username string

The author's external username

conversation array

The conversations array contains replies made to this post

Properties
Name Type Description
message array

An individual message in the conversation

Properties
Name Type Description
id string

The external message ID

user Object

The message author.

Properties
Name Type Description
id string

The author's external user ID

name string

The author's name

datetime int

The message created time as a Unix timestamp. e.g. 1460869577

text string

The message content.

source string

The social network type of the message. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM", "YOUTUBE"

geo string

The geolocation of the author

attachments array

The post attachments.

Properties
Name Type Description
attachment Object

An attachment object

Properties
Name Type Description
type string

The attachment type. Valid values are: "link", "video", "photoalbum" and "photo"

title string

The attachment title

items Object

The attachment items object

Properties
Name Type Description
target string

url to the resource

thumbnailsrc string

url to the thumbnail

profile Object

The user profile object

Properties
Name Type Description
network string

The social network type of the message. Valid values are: "TWITTER", "FACEBOOK", "INSTAGRAM", "YOUTUBE"

id string

Twitter: Profile ID

id string

Facebook: User ID

first_name boolean

Facebook: User's first name

last_name boolean

Facebook: User's last name

name string

Facebook: User's full name

gender boolean

Facebook: User's gender. e.g. "male"

link boolean

Facebook: Link to user's profile on Facebook

locale string

Facebook: Locale of the user. e.g. "en_US"

location string

Facebook: Location of the user. e.g. "Seattle, WA"

picture string

Facebook: User's profile picture

bio string

Facebook: User's bio

website string

Facebook: User's website url

id string

Instagram: User ID

username string

Instagram: Username

full_name string

Instagram: User's full name

profile_picture string

Instagram: User's profile picture

bio string

Instagram: User's bio

website string

Instagram: User's website url

id string

YouTube: User ID

name string

YouTube: User's name

first_name string

YouTube: User's first name

last_name string

YouTube: User's last name

avatar_url string

YouTube: User's avatar url

description string

YouTube: User's description

Source:
Examples
//TWITTER
{
  "post": {
    "network": "TWITTER",
    "id": "771716842947682305",
    "user": {
      "userid": "17093617"
    }
  },
  "profile": {
    "network": "TWITTER",
    "id": "17093617"
  }
}
//FACEBOOK POST
{
  "post": {
    "network": "FACEBOOK",
    "href": "http://www.facebook.com/177463958820/posts/10154100312988821",
    "id": "177463958820_10154100312988821",
    "parentId": null,
    "datetime": "2016-09-01T01:30:42.000Z",
    "source": "Hootsuite",
    "counts": {
      "likes": 21,
      "dislikes": 0,
      "replies": 2,
      "shares": 15,
      "views": 0
    },
    "content": {
      "body": "These social media apps are the best of the best 👍",
      "bodyhtml": "These social media apps are the best of the best 👍"
    },
    "user": {
      "userid": "177463958820",
      "username": "Hootsuite"
    },
    "attachments": [
      {
        "type": "link",
        "url": "http://www.facebook.com/l.php?u=http%3A%2F%2Fow.ly%2FCR4m303JTAU&h=UAQFEZyBy&s=1&enc=AZOLR-5WPNQ6XJo1ApvRmG508-gHAG_HYtoQwLhb-hy841IIpayS66Fv41FrUV_uESLqgMlvV7IQ3-c_7-7Fxbdi3gB_3YeJzBlosVjcG4X1YQ",
        "title": "10 Social Media Apps You Should Be Using in 2016 (But Probably Aren’t)",
        "thumbnail": "https://external.xx.fbcdn.net/safe_image.php?d=AQAwngKEdE0TsGXR&w=720&h=720&url=https%3A%2F%2Fblog.hootsuite.com%2Fwp-content%2Fuploads%2F2016%2F05%2FBest-Social-Media-Apps-1.jpg&cfs=1",
        "items": {
          "target": "http://www.facebook.com/l.php?u=http%3A%2F%2Fow.ly%2FCR4m303JTAU&h=UAQFEZyBy&s=1&enc=AZOLR-5WPNQ6XJo1ApvRmG508-gHAG_HYtoQwLhb-hy841IIpayS66Fv41FrUV_uESLqgMlvV7IQ3-c_7-7Fxbdi3gB_3YeJzBlosVjcG4X1YQ",
          "thumbnailsrc": "https://external.xx.fbcdn.net/safe_image.php?d=AQAwngKEdE0TsGXR&w=720&h=720&url=https%3A%2F%2Fblog.hootsuite.com%2Fwp-content%2Fuploads%2F2016%2F05%2FBest-Social-Media-Apps-1.jpg&cfs=1"
        }
      }
    ],
    "conversation": [
      {
        "id": "10154100312988821_10154100449008821",
        "user": {
          "id": "10104018359821569",
          "name": "Dani PonyGirl Trynoski",
          "username": null
        },
        "datetime": 1472696475,
        "source": "facebook",
        "geo": null,
        "text": "Sandra Alvarez Peter Konieczny for marketing"
      },
      {
        "id": "10154100312988821_10154100326138821",
        "user": {
          "id": "10206688446563331",
          "name": "Heather Davis",
          "username": null
        },
        "datetime": 1472694143,
        "source": "facebook",
        "geo": null,
        "text": "Dani PonyGirl Trynoski"
      }
    ]
  },
  "profile": {
    "network": "FACEBOOK",
    "id": "177463958820",
    "link": "https://www.facebook.com/hootsuite/",
    "location": {
      "city": "Vancouver",
      "country": "Canada",
      "latitude": 49.264077580414,
      "longitude": -123.1045031954,
      "state": "BC",
      "street": "East 8th Avenue",
      "zip": "V5T1R6",
      "concatedName": "Vancouver, BC, Canada"
    },
    "name": "Hootsuite",
    "picture": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/10448746_10152282325793821_3338783409805956929_n.jpg?oh=cdfc0f425c8afa0c6ecae8c45c024bc7&oe=5854D36C",
    "website": [
      "http://hootsuite.com"
    ]
  }
}
//FACEBOOK COMMENT
{
  "post": {
    "network": "FACEBOOK",
    "href": null,
    "id": "10154100312988821_10154100326138821",
    "parentId": "177463958820_10154100312988821",
    "datetime": "2016-09-01T01:42:23.000Z",
    "source": "",
    "counts": {
      "likes": 0,
      "dislikes": 0,
      "replies": 3,
      "shares": 0,
      "views": 0
    },
    "content": {
      "body": "Dani PonyGirl Trynoski",
      "bodyhtml": "Dani PonyGirl Trynoski"
    },
    "user": {
      "userid": "10206688446563331",
      "username": "Heather Davis"
    },
    "attachments": [],
    "conversation": [
      {
        "id": "10154100312988821_10154100470998821",
        "user": {
          "id": "10104018359821569",
          "name": "Dani PonyGirl Trynoski",
          "username": null
        },
        "datetime": 1472696881,
        "source": "facebook",
        "geo": null,
        "text": "hahaha Truth!! Plus obtain work phones that can actually use Instagram & Hootsuite apps :)"
      },
      {
        "id": "10154100312988821_10154100450453821",
        "user": {
          "id": "10206688446563331",
          "name": "Heather Davis",
          "username": null
        },
        "datetime": 1472696560,
        "source": "facebook",
        "geo": null,
        "text": "Dani PonyGirl Trynoski yes some but not all. When we are CEO/Pres. we will have time to look into further!"
      },
      {
        "id": "10154100312988821_10154100448023821",
        "user": {
          "id": "10104018359821569",
          "name": "Dani PonyGirl Trynoski",
          "username": null
        },
        "datetime": 1472696454,
        "source": "facebook",
        "geo": null,
        "text": "Some of these are really neat, but my phone won't use half of these, the OS is too old now :(  A few of the apps on this list sound similar to apps already on the market though...and will need a huge user following to make them useful for marketing."
      }
    ]
  },
  "profile": {
    "network": "FACEBOOK",
    "first_name": "Heather",
    "id": "10206688446563331",
    "last_name": "Davis",
    "link": "https://www.facebook.com/app_scoped_user_id/10206688446563331/",
    "name": "Heather Davis",
    "picture": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100254_10208897586990461_6596975871296514827_n.jpg?oh=ea8e96ff52e6aee4f7f388837b220419&oe=5856173C"
  }
}
// INSTAGRAM
{
  "post": {
    "network": "INSTAGRAM",
    "href": "https://www.instagram.com/p/BJ0rybJAZ-_/",
    "id": "1329880371097083839_2182934",
    "parentId": null,
    "datetime": "2016-09-01T18:21:55.000Z",
    "source": "",
    "counts": {
      "likes": 231,
      "dislikes": 0,
      "replies": 6,
      "shares": 0,
      "views": 0
    },
    "content": {
      "body": "#TBT to sunshine, kiddie pools & #hootroof ☀️ #hootsuitelife 📷: @jlovebomb",
      "bodyhtml": "#TBT to sunshine, kiddie pools & #hootroof ☀️ #hootsuitelife 📷: @jlovebomb"
    },
    "user": {
      "userid": "2182934",
      "username": "hootsuite"
    },
    "attachments": [
      {
        "type": "image",
        "url": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/14099911_1806451969591609_935516459_n.jpg?ig_cache_key=MTMyOTg4MDM3MTA5NzA4MzgzOQ%3D%3D.2",
        "thumbnail": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/14099911_1806451969591609_935516459_n.jpg?ig_cache_key=MTMyOTg4MDM3MTA5NzA4MzgzOQ%3D%3D.2",
        "title": "",
        "items": {
          "target": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/14099911_1806451969591609_935516459_n.jpg?ig_cache_key=MTMyOTg4MDM3MTA5NzA4MzgzOQ%3D%3D.2",
          "thumbnailsrc": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/14099911_1806451969591609_935516459_n.jpg?ig_cache_key=MTMyOTg4MDM3MTA5NzA4MzgzOQ%3D%3D.2"
        },
        "indices": null
      }
    ],
    "conversation": []
  },
  "profile": {
    "network": "INSTAGRAM",
    "id": "2182934",
    "username": "http://ow.ly/YeRp302oVTW",
    "full_name": "Hootsuite",
    "profile_picture": "https://scontent.cdninstagram.com/t51.2885-19/11375961_427979087373427_1871744831_a.jpg",
    "bio": "A look inside Hootsuite—the world's most widely used platform for managing social media. #hootsuitelife",
    "website": "http://ow.ly/YeRp302oVTW"
  }
}
//INSTAGRAM COMMENT
{
  "post": {
    "network": "INSTAGRAM",
    "href": null,
    "id": "17842003228147208",
    "parentId": "1329880371097083839_2182934",
    "datetime": "2016-09-01T18:38:12.000Z",
    "source": "",
    "counts": {
      "likes": 0,
      "dislikes": 0,
      "replies": 0,
      "shares": 0,
      "views": 0
    },
    "content": {
      "body": "Apparently I hate kiddy pools and sunshine. #ItsFineImFine",
      "bodyhtml": "Apparently I hate kiddy pools and sunshine. #ItsFineImFine"
    },
    "user": {
      "userid": "289288021",
      "username": "kallistac"
    },
    "attachments": [],
    "conversation": []
  }
}
//YOUTUBE
{
  "post": {
    "network": "YOUTUBE",
    "href": "https://youtu.be/52KPW-Oxdp0",
    "id": "52KPW-Oxdp0",
    "parentId": null,
    "datetime": "2016-08-30T19:10:00.000Z",
    "source": "",
    "counts": {
      "likes": 0,
      "dislikes": 0,
      "replies": 0,
      "shares": 0,
      "views": 52
    },
    "content": {
      "body": "To learn more about Hootsuite & social media, visit our main channel http://youtube.com/hootsuite",
      "bodyhtml": "To learn more about Hootsuite & social media, visit our main channel http://youtube.com/hootsuite"
    },
    "user": {
      "userid": "UCadkzFvpo9WwH20bF5oSR4g",
      "username": "Hootsuite University"
    },
    "attachments": [
      {
        "type": "video",
        "url": "//www.youtube.com/embed/52KPW-Oxdp0",
        "thumbnail": "https://i.ytimg.com/vi/52KPW-Oxdp0/sddefault.jpg",
        "title": "",
        "items": {
          "target": "//www.youtube.com/embed/52KPW-Oxdp0",
          "thumbnailsrc": "https://i.ytimg.com/vi/52KPW-Oxdp0/sddefault.jpg"
        },
        "indices": null
      },
      {
        "type": "link",
        "url": "http://youtube.com/hootsuite",
        "title": null,
        "thumbnail": "",
        "items": {
          "target": "http://youtube.com/hootsuite",
          "thumbnailsrc": ""
        }
      }
    ],
    "conversation": []
  },
  "profile": {
    "network": "YOUTUBE",
    "id": "UCadkzFvpo9WwH20bF5oSR4g",
    "name": "Hootsuite University",
    "first_name": null,
    "last_name": null,
    "avatar_url": "https://yt3.ggpht.com/-3bZs2qxbMm0/AAAAAAAAAAI/AAAAAAAAAAA/h2VT7HhsTTE/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
    "description": "Hootsuite University is an online certification program that delivers best in class education about Social Media and Hootsuite. http://learn.hootsuite.com/\n\nStudents enjoy access to video-based learning modules about Hootsuite and Social Media, along with an extensive Lecture Series library from top educators, a social media jobs board and a weekly #HSUchat.\n\nAfter becoming Hootsuite Certified, students are listed in the HootSuite Social Media Consultant Directory. For more information on Hootsuite University: http://www.slideshare.net/hootsuite/hootsuite-university-social-media-overview"
  }
}
//YOUTUBE COMMENT
{
  "post": {
    "network": "YOUTUBE",
    "href": "https://youtu.be/eqcDfJ1a1gM",
    "id": "z13sjdzg3myyezyai04chfczgpmbg3nyd0k",
    "parentId": "52KPW-Oxdp0",
    "datetime": "2016-09-02T16:49:41.000Z",
    "source": "",
    "counts": {
      "likes": 0,
      "dislikes": 0,
      "replies": 0,
      "shares": 0,
      "views": 0
    },
    "user": {
      "userid": "UCVfYrVZWj7lnzYScjroJKzw",
      "username": "Sergio Fuentealba"
    },
    "content": {
      "body": "No es posible usar Linden desde el Hootsuite desde el iPhone?",
      "bodyhtml": "No es posible usar Linden desde el Hootsuite desde el iPhone?"
    },
    "attachments": [],
    "conversation": []
  },
  "profile": {
    "network": "YOUTUBE",
    "id": "UCVfYrVZWj7lnzYScjroJKzw",
    "name": "Sergio Fuentealba",
    "first_name": null,
    "last_name": null,
    "avatar_url": "https://yt3.ggpht.com/-wK0-y5KrS7k/AAAAAAAAAAI/AAAAAAAAAAA/McvjTX_pvyo/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
    "description": ""
  }
}