You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Social Media Posts

social-media/posts@1.0.1
4 providers

Get Profile's Posts

Retrieve a paginated list of posts from a social media profile.

Input
Profile ID
Before date
After date
Page
Result
Previous page
Next page
Posts

1.Choose a provider

2.Use GetProfilePosts with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

Structure details

Input (object)

profileId
Identifier of a profile to retrieve posts from. May be optional with some providers.
beforeDate
Filter posts that have been created before the date in ISO 8601 date and time format.
afterDate
Filter posts that have been created after the date in ISO 8601 date and time format.
page
Pagination cursor (obtained from `previousPage` or `nextPage`).

Example

Result (object)

previousPage
Previous page cursor.
nextPage
Next page cursor.
posts
List of posts ordered by creation date. Latest posts are on the top of the list.
id
Identifier of the post.
url
Permanent URL to the post.
createdAt
Date and time the post was published at.
text
Text of the post.
attachments
List of attachments.
type
Attachment type (e.g. image, video).
url
Attachment URL.
preview
Thumbnail or another preview of the attachment.
title
Attachment title.
description
Attachment description.
altText
Alternative text of the attachment.
duration
Duration of the attached video.
width
Widht of the attached image.
height
Height of the attached image.

Example

Implementation details

Provider
mock
Use case
GetProfilePosts
Author
@superface
Source
Verified