TwitterShots icon

TwitterShots

Get Tweet screenshots from TwitterShots API

Tweet Screenshot → Get

AI-generated

Overview

This node retrieves a screenshot of a specified tweet using the TwitterShots API. It is useful for scenarios where users want to visually capture and share tweets in various formats such as SVG, PNG, or HTML. For example, marketers or social media managers can use this node to generate tweet images for presentations or social media posts.

Use Case Examples

  1. Generate an SVG screenshot of a tweet by providing the tweet ID.
  2. Retrieve a PNG image of a tweet with a dark theme and no logo.
  3. Get an HTML representation of a tweet screenshot for embedding in a webpage.

Properties

Name Meaning
Tweet ID The ID of the tweet to screenshot, required to specify which tweet to capture.
Format The format of the screenshot, which can be SVG (default), PNG, or HTML.
Theme The theme of the screenshot, either light (default) or dark.
Logo The logo displayed on the screenshot, options include X (Twitter) as default, Bluebird, or none.
Return Type Specifies the return type of the response, either as a binary buffer (image file) or a JSON containing a URL to the image.
Additional Fields Optional additional fields to customize the screenshot, such as background image URL, border radius, container background color, container padding, and toggles for showing full text, stats, timestamp, and views count.

Output

Binary

Binary output contains the image file data when the return type is set to buffer, supporting formats like SVG, PNG, or JPEG.

JSON

  • json - Contains JSON data with either the image URL or HTML content depending on the format and return type.
    binary data - Contains the binary image data when the return type is buffer, named as tweet..

Dependencies

  • TwitterShots API
  • An API key credential for TwitterShots API authentication

Troubleshooting

  • Common issues include invalid or missing tweet ID, which results in API errors. Ensure the tweet ID is correct and accessible.
  • Incorrect format or theme values may cause unexpected output; use the provided options.
  • Network or authentication errors with the TwitterShots API can occur; verify API credentials and network connectivity.
  • Error messages from the API are propagated as node errors; enabling 'Continue On Fail' allows processing to continue with error details in output.

Links

Discussion