Post
Whenever you're dealing with a post in your template, you're actually working with a Post object. As each provider returns different content, some attributes will return different content. However, the purpose of a Post object is to normalize the content from a provider.
You can access the raw content fetched from a provider's API using the data attribute.
Properties
Type: string|null
The ID of the post.
Type: string|null
The unique or secondary identifer.
Type: string|null
The main text for the post.
Type: string|null
The URL to the post on the provider site.
Type: int|null
The ID for the Source.
Type: string|null
The handle for the Source.
Type: string|null
The type of Source.
Type: string|null
The type of post this is classified as.
Type: int|null
The number of likes this post has received.
Type: int|null
The number of shares this post has received.
Type: int|null
The number of replies this post has received.
Type: verbb\socialfeeds\models\PostAuthor|null
The Post Author.
Type: array
A collection of tags or hashtags for the post.
Type: array
A collection of Post Link objects.
Type: array
A collection of Post Media objects.
Type: array
A collection of Post Media objects.
Type: array|null
A full response from the social media provider.
Type: array|null
Any additional content for the post type for easy-access.
Methods
Returns: string|null
Returns the source this post was made from.
Returns: Twig\Markup
Returns text or message as the main content of the post.
Returns: bool
Whether or not a post contains an image or video.
Returns: array|null
Returns the author's profile image (if one exists).
Returns: array|null
Returns the first image (typically the primary image) for the post.
Returns: array|null
Returns the first video (typically the primary video) for the post.
Returns: string
Returns a "friendly" representation of a date (e.g. 5.2M).
The primary brand color of the provider connected.
The SVG icon of the source provider connected.
Post Author
Properties
Type: string|null
The ID of the author.
The username of the author.
The name of the author.
Type: string|null
The url of the author.
The photo of the author.
Post Media
A media item represents either a video or an image.
Properties
Type: string|null
The ID of the media item.
Type: string|null
The title of the media item.
The type of media item (video or image).
Type: string|null
The url of the media item.
The width of the media item.
The height of the media item.
Post Link
Properties
Type: string|null
The ID of the link.
Type: string|null
The title of the link.
Type: string|null
The ID of the link.