Farcaster: Frame builder icon

Farcaster: Frame builder

Generates Framecaster HTML with meta tags for provided frame parameters

Overview

This node generates an HTML frame embedded with meta tags based on the provided parameters. It is designed to create Framecaster-compatible HTML content, optionally including additional tags that conform to the Open Frames specification. This is useful for scenarios where you want to dynamically build rich HTML frames with metadata for social sharing, embedding, or integration with platforms supporting Framecaster or Open Frames standards.

Practical examples include:

  • Creating a shareable HTML snippet with a specified image and interactive buttons.
  • Embedding custom metadata into an HTML template for enhanced social media previews.
  • Generating frames that support user interaction via buttons triggering actions like links, minting, posting, redirects, or transactions.

Properties

Name Meaning
Image URL of the frame image to be embedded in the meta tags.
Open Frames Support Boolean flag to include additional meta tags conforming to the Open Frames standard. When enabled, extra tags prefixed with of: are added alongside Framecaster tags.
Buttons A collection of buttons to embed in the frame. Each button has:
- Label: Text shown on the button.
- Action: One of Link, Mint, Post, Redirect, Transaction.
- Action Target: Optional target URL or identifier.
- Post URL: Custom URL for post action.
Additional Fields A set of optional fields:
- Aspect Ratio: Image aspect ratio, either "1.91:1" or "1:1".
- Input: Label for a text input field.
- Callback URL: Endpoint URL to receive signature packets.
- State: JSON string representing state passed to the frame server.
- HTML Template: Base HTML template to embed meta tags into.
- Custom Meta: Additional custom meta tags as name-value pairs.
- Version: Version string of the frame (default "vNext").

Output

The node outputs a single JSON object containing one field:

  • html: A string representing the complete serialized HTML document. This HTML includes the original template with injected <meta> tags in the <head> section according to the input parameters and options.

No binary data output is produced by this node.

Dependencies

  • The node uses the jsdom library to parse and manipulate the HTML template DOM structure.
  • No external API calls or services are required.
  • No special credentials or environment variables are needed.

Troubleshooting

  • Empty or invalid HTML output: Ensure the provided HTML template is valid and contains <head> and <body> tags. The node injects meta tags into the <head>.
  • Missing or incorrect meta tags: Verify that all required properties (like the image URL) are correctly set and non-empty.
  • JSON parsing errors for state: The state property must be a valid JSON string; otherwise, it may cause issues when embedding.
  • Buttons not appearing or malformed: Check that each button entry has a label and a valid action selected.
  • Open Frames tags missing despite enabling option: Confirm that the "Open Frames Support" boolean is set to true.

Links and References

Discussion