Add “like” and “recast” reactions on Farcaster casts
This guide demonstrates how to like or recast a cast with the Neynar SDK.
Check out this Getting Started Guide to learn how to set up your environment and get an API key.
First, initialize the client:
Then, like a cast:
Recasting works the same way, replace “like” with “recast”:
The response status code should return a 200 status code.
To verify that the reaction was published, you can fetch the cast’s reactions:
Which would print out
That’s it! You can now like or recast any cast on Farcaster.
PS - to learn more about how writes technically works on Farcaster, read Write to Farcaster with Neynar Managed Signers
Get your subscription at neynar.com and reach out to us on Telegram with any questions!
Add “like” and “recast” reactions on Farcaster casts
This guide demonstrates how to like or recast a cast with the Neynar SDK.
Check out this Getting Started Guide to learn how to set up your environment and get an API key.
First, initialize the client:
Then, like a cast:
Recasting works the same way, replace “like” with “recast”:
The response status code should return a 200 status code.
To verify that the reaction was published, you can fetch the cast’s reactions:
Which would print out
That’s it! You can now like or recast any cast on Farcaster.
PS - to learn more about how writes technically works on Farcaster, read Write to Farcaster with Neynar Managed Signers
Get your subscription at neynar.com and reach out to us on Telegram with any questions!