// Note: This is typically configured server-side
let popularSelector: [String: Any] = [
"min_popularity": 10,
"type": "popular"
]
let feedGroupConfig: [String: Any] = [
"id": "foryou",
"activity_selectors": [popularSelector]
]
Activity Feeds V3 is in closed alpha — do not use it in production (just yet).
Selectors
Activity Selectors
The activity selectors give you control over which data is shown in a feed. By default the feed shows:
- Activities you’ve added to it
- Activities from the feeds this feed follows
You can extend this logic in a few different ways and include:
- Popular activities
- Activities close to the user
- Activities from a certain activity query/filter
- Activities from a different feed
- Activities from the feeds you follow and your follow suggestions
Here are examples of updating your feed group (or feed view) to enable these:
Popular Activity Selector
const view = await serverClient.feeds.createFeedView({
view_id: uuidv4(),
activity_selectors: [
{
type: "popular",
min_popularity: 10,
},
],
});
const response = await serverClient.feeds.createFeedGroup({
feed_group_id: "myid",
default_view_id: view.feed_view.view_id,
});
On this page: