Skip to main content
Members follow people for a reason, but in a busy network those people’s posts get buried under everything from the communities a member joined, and posts they write in communities the member hasn’t joined never show up at all. The following feed builds a feed around the people each member chose to follow: it returns posts from the users the current user follows, in one paginated collection. With customRanking (the default), it also includes the user’s own posts and posts from the communities the user joined. With lastCreated, your network decides what appears alongside followed users: keep joined communities, add what followed users post in any public community, or narrow the feed to followed people only (see Which posts appear). getFollowingFeed() is a live collection on the feed repository. The backend decides which posts match; the SDK takes a sort order (and, on TypeScript, a page size) and returns the posts the backend provides.

Parameters

The following feed takes no other filters: there is no dataTypes, includeMixedStructure, or excludeBlockUserPosts option.

Query the following feed

Use getFollowingFeed() for a “Following” tab built around the people a user follows. Pass lastCreated when you want a chronological list.
If a request fails, the error is reported through the platform’s error path: error in the TypeScript callback, error in the iOS observe block, and the error handler on Android. Posts already loaded stay in the list.

Choose a sort order

When you don’t set sortBy, the backend applies customRanking. Both orders return the same post format and page the same way; only which posts come back, and their order, differ.

Which posts appear

With lastCreated, your network’s following feed configuration decides which posts appear. It is made of the sources below, and each one is turned on or off separately: Each source starts from your network’s global feed setting for the same source, so the defaults above apply only while your global feed uses its defaults. For example, if your global feed is set to show posts from everyone, lastCreated also includes posts on every user’s profile, followed or not. Once a source is changed for the following feed, it no longer follows the global feed, and the change doesn’t affect the global feed. Two common setups:
  • People and communities: the defaults, plus followed users’ posts in public communities. The feed keeps the communities the user joined and adds what followed users post in communities the user hasn’t joined.
  • People only: joined communities turned off, followed users’ posts in public communities turned on. The feed contains only people the user follows, plus the user’s own posts when that source is on.
Posts in private communities come only from the joined communities source. When that source is off, they’re left out, even when the user is a member and the author is followed. This includes the user’s own posts there. Contact social.plus Support to change which sources your network’s following feed includes, or to check its current setup. These sources apply only to the following feed with lastCreated: customRanking and the global feed are not affected. On both orders, the feed never includes deleted posts, posts awaiting review, hidden posts, or event posts. Visitor users can read the feed.

Real-time updates

The following feed is a live collection, but it does not add new posts on its own. Whether a new post belongs in a user’s following feed depends on who they follow and on your network’s configuration, which only the backend knows. To show new posts, load the feed again from the first page, for example on pull to refresh or when the screen opens.
With customRanking, a newly created post can take a few minutes to appear, even after a refresh. lastCreated shows it on the next refresh.
To show the current user’s new post at the top right away, add the post returned by createPost to the top of your list in the app, and drop it once a refresh returns it from the feed.

Blocked users

The following feed leaves out posts written by users the current user has blocked and by users who have blocked the current user. A post written by someone else is still shown when it only mentions a blocked user. A block or unblock is reflected the next time the feed is loaded from the first page. Blocking a user also removes the current user’s follow of them, so after an unblock, follow the user again to bring their posts back into the feed.

Platform notes

  • Availability: Android 7.34.0, iOS 8.13.0, and TypeScript 7.34.0 or later.
  • TypeScript exposes limit. Android and iOS always request 20 posts per page.
  • Android returns Flowable<PagingData<AmityPost>>. iOS returns AmityCollection<AmityPost>. TypeScript reports pages through the live collection callback and returns an unsubscribe function.
  • Flutter does not have a following feed.

Feeds & Timelines

Compare the following feed with the For You, global, and custom-ranking feeds.

Follow and Unfollow

Build the follow relationships the following feed is based on.

Global Feed

The chronological feed of everything the user can see.