Skip to main content

Following and unfollowing

Following

Following a user is as easy as calling agent.follow with the DID of the user you want to follow.

agent.follow
  const { uri } = await agent.follow(did)
ParameterTypeDescriptionRequired
didstringThe DID of the user to followYes

Unfollowing

Unfollowing a user involves deleting the follow record via its URI, returned from agent.follow. This is very similar to what we did when unliking a post.

agent.deleteFollow
  await agent.deleteFollow(uri)
ParameterTypeDescriptionRequired
uristringThe URI of the follow record to deleteYes