Feed & Timeline

Let your users showcase their unique personality right in their timelines

Feed is a new way for users to create content on various areas of the SDK. Currently, users and groups can have feeds. Each feed consists of a collection of posts. Users are able to create posts on any groups that they are a member of and any user that they can find.

There are 3 types of feeds:

  1. User Feed This is a collection of posts for a user's timeline.

  2. Group Feed This is a collection of posts from members of the group or community.

  3. Global Feed This is an aggregate of both User and Group feeds.

Query User Feed

You can get any user's feed by calling the method below with the userId and user in targetId and targetType respectively:

When querying posts, the tags parameter is always optional regardless of which feed you are querying. Up to five tags can be added and each tag can be up to 24 characters long. If you don't want to filter by tags when querying, just omit the tags parameter. Do not pass an empty array.

Query Group Feed

You can get any group's feed by calling the method below with the communityId and community in targetId and targetType respectively:

Users without moderation permissions will receive only the posts they created for reviewing and declined feeds.

Query Global Feed

A global feed is an aggregate of all the posts in a user's feed. You can retrieve your global feed by calling the following method:

This will return the posts in chronological order. This means that newer posts will rank higher than older ones, thus, the former will show up higher in the feed.

Custom Post Ranking

You can retrieve your global feed sorted by ranking score. Querying global feed using custom post ranking is a smarter way of ordering posts in the global feed because it supports a score-sorting mechanism. Refer to Custom Post Ranking for more information about this feature.

To implement custom post ranking in your global feed, you just need to pass useCustomRanking: true to queryGlobalFeed.

Pagination

Use runQuery to query a feed.

Last updated