Skip to content

How to send a post with hashtags? #507

Answered by MarshalX
Murray2015 asked this question in Questions
Discussion options

You must be logged in to vote

Hi, you should work with facets (rich text). Here you can read more about it: https://docs.bsky.app/docs/advanced-guides/post-richtext

Here is how to use SDK`s helper to make it easy:

from atproto import client_utils
text = client_utils.TextBuilder().text('I love ').tag('#cats', 'cats')
client.send_post(text)

Read more about TextBuilder: https://atproto.blue/en/latest/atproto_client/utils/text_builder.html

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Murray2015
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #506 on December 23, 2024 16:06.