Timeline

Timeline

All users have their personal timelines. Timeline contains posts from different topics user is following.

After users personal feeds will be available, timeline will contain activities of the followed users.

Load Activities

To get a list of posts in the Timeline, you have to create a query and call API to get the results:

1
2
3
4
5
6
7
8
9
val query: ActivitiesQuery = ActivitiesQuery.timeline()
val pagingQuery = PagingQuery(query)

Communities.getActivities(pagingQuery, { result: PagingResult<GetSocialActivity> ->
    val activities = result.entries
    Log.d("Communities", "Activities: $activities")
}, { error: GetSocialError ->
    Log.d("Communities", "Failed to get activities: $error")
})
1
2
3
4
5
6
7
8
let query: ActivitiesQuery = ActivitiesQuery.timeline()
let pagingQuery = ActivitiesPagingQuery(query)

Communities.activities(pagingQuery, success: { result in
    print("Activities: \(result.activities)")
}, failure: { error in
    print("Failed to get activities: \(error)")
})
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var query = ActivitiesQuery.Timeline();
var pagingQuery = new PagingQuery<ActivitiesQuery>(query);

Communities.GetActivities(pagingQuery,
    (result) => {
        Debug.Log("Activities: " + result.Entries);
    },
    (error) => {
        Debug.Log("Failed to get activities, error: " + error);
    });

This method uses the PagingQuery concept that is used across our SDK. Read more about this.

Working with timeline is similar to the Topics Feeds.

Give us your feedback! Was this article helpful?

😀 🙁