Farcaster Writes
Use the FDK to make writes to the Farcaster Network
These methods can be used to create casts, react to them, or even follow users. All of them require a signerId
which is a result of using Farcaster Auth, as well as the PinataFDK initialization with a Pinata JWT.
All of these methods also return the same response, which is the direct response from the Pinata Hub.
sendCast
With the sendCast
method you can effortlessly post to Farcaster using a signerId
.
Params
- CastRequest - An object that contains the
signerId
and thecastAddBody
which follows the Farcaster Hub standard for sending casts.
Example
deleteCast
This method can delete a cast with a provided target hash.
Params
- hash - Target hash of the cast that needs to be deleted
- signerId - Signer for the cast
Example
likeCast
This method can like a cast based on the provided target hash.
Params
- hash - Hash of the target cast to be liked
- signerId - Signer of the user liking the cast
Example
unlikeCast
If a cast is already liked by the user, this method will unlike it.
Params
- hash - Hash of the target cast to be unliked
- signerId - Signer of the user unliking the cast
Example
recastCast
This method will recast a cast based on the target hash.
Params
- hash - Hash of the target cast to be recast
- signerId - Signer of the user recasting target cast
Example
removeRecast
Works just like recastCast
but removes an existing recast based on a hash of the target cast.
Params
- hash - Hash of the target cast to remove recast
- signerId - Signer of the user removing the recast
Example
followUser
Follows a target user based on their FID.
Params
- fid - The FID of the target user to follow
- signerId - The signer for the user following the target user
Example
unfollowUser
Unfollows a user that the signer is already following.
Params
- fid - The FID of the target user to unfollow
- signerId - The signer for the user unfollowing the target user