Skip to content

Instantly share code, notes, and snippets.

@blowdart
Last active November 13, 2024 02:11
Show Gist options
  • Save blowdart/0e097e6f00b72fa2697f2a59206efdb6 to your computer and use it in GitHub Desktop.
Save blowdart/0e097e6f00b72fa2697f2a59206efdb6 to your computer and use it in GitHub Desktop.
Tagging the beans.monster
string userToTagHandle = "sinclairinat0r.com";
var userToTagDid = await agent.ResolveHandle(userToTagHandle);
var postBuilder = new("Hey ");
postBuilder.Append(new Mention(userToTagDid, $"@{userToTagHandle}"));
postBuilder.Append(" why not try some delicious ");
var shroudedLink = new Link("https://www.heinz.com/en-GB/products/05000157152886-baked-beanz", "beans");
postBuilder.Append(shroudedLink);
postBuilder.Append("? ");
postBuilder.Append("\nRead more: ");
var link = new Link("https://en.wikipedia.org/wiki/Heinz_Baked_Beans");
postBuilder.Append(' ');
postBuilder.Append(link);
postBuilder.Append('.');
var hashTag = new HashTag("beans");
postBuilder.Append(hashTag);
var facetedCreatePostResponse = await agent.Post(postBuilder, cancellationToken: cancellationToken);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment