How to send a post with hashtags? #507
Answered
by
MarshalX
Murray2015
asked this question in
Questions
|
Hi, I'm trying to create a post with a hashtag, which I think I don't need to do anything special to get to work. But they don't work - the hashtags don't post as hashtags; they are plain text. Example below: bsky_client = Client()
bsky_client.login(bsky_username, bsky_password)
bsky_client.send_post("I love #cats", langs=["en-UK"])Posts |
Answered by
MarshalX
Dec 23, 2024
Replies: 2 comments
|
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 |
0 replies
Answer selected by
Murray2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Read more about TextBuilder: https://atproto.blue/en/latest/atproto_client/utils/text_builder.html