Boost Engagement

This guide will show you the essential signal-boosting features on Lens.


Reposting

Users can repost any Post to their own Feed, another Feed, or even the Global Lens Feed. Reposting is an effective way for users to amplify content they find valuable and share it with their followers.

You can use the repost mutation to create a repost on Lens.

You MUST be authenticated as Account Owner or Account Manager to make this request.

mutation {  repost(request: { post: "42", feed: "0xabc123…" }) {    ... on PostResponse {      hash    }
    ... on SponsoredTransactionRequest {      ...SponsoredTransactionRequest    }
    ... on SelfFundedTransactionRequest {      ...SelfFundedTransactionRequest    }
    ... on TransactionWillFail {      reason    }  }}

Finally, handle the result as explained in the Transaction Lifecycle guide.

Reactions

Reactions let users express their opinion on a Post, providing immediate feedback to the Post's author on how their content resonates with the audience.

Currently, reactions are not stored on-chain. We plan to implement a decentralized solution in the future that maintains a smooth user experience while aligning with the web3 ethos.

Add a Reaction

At present, users can react to a Post with an upvote or downvote. In the future, more reaction options may be introduced to offer a wider range of engagement possibilities.

Use the addReaction mutation to add a reaction to a Post.

You MUST be authenticated as Account Owner or Account Manager to make this request.

mutation {  addReaction(    request: {      post: "42"      reaction: UPVOTE # or DOWNVOTE    }  ) {    ... on AddReactionResponse {      success    }    ... on AddReactionFailure {      reason    }  }}

Undo a Reaction

Users can undo their reaction to a Post at any time.

Use the undoReaction mutation to remove a reaction from a Post.

You MUST be authenticated as Account Owner or Account Manager to make this request.

mutation {  undoReaction(    request: {      post: "42"      reaction: DOWNVOTE # or UPVOTE    }  ) {    ... on UndoReactionResponse {      success    }    ... on UndoReactionFailure {      reason    }  }}

Fetch Reactions

You can use the paginated postReactions query to fetch the reactions for a Post.

mutation {  postReactions(    request: {      post: "42"      # filter: { anyOf: [UPVOTE] } # Optional      # orderBy: DEFAULT | ACCOUNT_SCORE    }  ) {    items {      reactions {        reaction        reactedAt      }      account {        address        username        metadata {          name          picture        }      }    }    pageInfo {      prev      next    }  }}

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