Help & Support

Timelines

Timelines are personalized lists of posts, tailored for each account according to their social graph.

Account Timeline

The account timeline is the aggregated list of items (root posts, comments, reposts) generated from the account's social graph. The timeline is organized based on relevance and recency.

Use the fetchTimeline action to fetch the account timeline.

import { evmAddress } from "@lens-protocol/client";import { fetchTimeline } from "@lens-protocol/client/actions";
import { client } from "./client";
const result = await fetchTimeline(client, {  account: evmAddress("0x1234…"),});
if (result.isErr()) {  return console.error(result.error);}
// items: Array<TimelineItem>: [{ id: UUID, primary: Post, ... }, ... ]const { items, pageInfo } = result.value;

See the Pagination guide for more information on how to handle paginated results.

Timeline Highlights

Timeline Highlights is a curated selection of posts from an account timeline that have received the most engagement. This feature is useful for quickly catching up on the most popular content.

Use the fetchTimelineHighlights action to fetch most popular posts and quotes from an account timeline.

import { evmAddress } from "@lens-protocol/client";import { fetchTimelineHighlights } from "@lens-protocol/client/actions";
import { client } from "./client";
const result = await fetchTimelineHighlights(client, {  account: evmAddress("0x1234…"),});
if (result.isErr()) {  return console.error(result.error);}
// items: Array<Post | Repost>const { items, pageInfo } = result.value;

See the Pagination guide for more information on how to handle paginated results.