ADMIN SIGN IN
< All Topics
Print

Social

To get a list of social media posts use the following:

{
"action":"get_posts",
"limit":<number>,
"offset": <number>
}

A successful response will contain an array of posts in JSON format with each post item containing the following:

{
"media": <array of media>,
"post": {
"author":<string>,
"commentCount":<number>,
"created": <unix_timestamp>,
"edited":<unix_timestamp>,
"id":<number>,
"memberId":<number>,
"message":<string>,
"parentId":<number>
},
"reactions": <array of reactions>
}

Each media item will contain:

{
"id":<number>,
"imageData": <string: base 64 encoded image>,
"postId":<number>
}

Each reaction item will contain:

{
"id":<number>,
"memberId":<number>,
"postId":<number>,
"reaction":<number: reaction type index>
}

Create

A member can use the following POST request to create a social media post:

{
"action":"create_post",
"memberId":<number: the members id>,
"message":<string>,
"images":<array of images>
}

If this is a comment on a post, use the same data but add “parentId” with the id of the post that this is a comment for.

Update

A member can update their own post using the following request:

{
"action":"update_post",
"id":<number: post id to update>,
"memberId":<number: the members id>,
"message":<string>,
"images":<array of images>
}

Delete

A member can delete their own post using the following POST request:

{
"action":"delete_post",
"postId":<number>
}

Reactions

Create

You can create a reaction to a post using the following:

{
"action":"create_post_reaction",
"postId":<number>,
"memberId":<number>,
"reaction":<number: type of reaction>
}

Get

{
"action": "get_post_reactions",
"postId":<number>
}

Comments

Get

{
"action":"get_post_comments",
"postId":<number>
}

Note: Use the create post action to create comments by specifying a parentId in the request body.

Table of Contents
Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from - Youtube
Vimeo
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google
Spotify
Consent to display content from - Spotify
Sound Cloud
Consent to display content from - Sound