Facebook Poster

Đăng bài lên Facebook sử dụng Facebook Poster API

Overview

This node, named Facebook Poster, enables posting content to Facebook using a custom API endpoint. Specifically for the Post Multiple Photos operation under the Post resource, it allows users to upload multiple photos simultaneously to either a personal profile or a Facebook page.

Common scenarios where this node is beneficial include:

  • Social media managers automating photo album uploads to Facebook pages.
  • Marketing teams scheduling multiple image posts to profiles or pages.
  • Developers integrating bulk photo posting into their workflows without manual Facebook UI interaction.

For example, a user can prepare several images in binary form and use this node to post them all at once with an optional caption to a specified Facebook page.

Properties

Name Meaning
Target Type Choose whether to post to a "Profile" (personal timeline) or a "Page" (Facebook page).
Target The User ID or Page ID where the photos will be posted. This is required.
Caption Text description or message accompanying the photos. Optional.
Images A collection of images to post. Each image is specified by the name of the binary property containing the image data. Multiple images can be added.

Output

The node outputs JSON data representing the response from the Facebook Poster API after attempting to post the photos. The structure typically includes success indicators and any returned metadata from the API about the posted photos.

If the operation fails, the output JSON contains an error field with the error message and a success flag set to false.

The node does not output binary data directly; it only sends binary image data as input and returns JSON responses.

Dependencies

  • Requires an external Facebook Poster API service endpoint, which defaults to http://localhost:3000 but can be configured via credentials.
  • Needs an API key credential for authentication with the Facebook Poster API.
  • Uses the axios library for HTTP requests.
  • Utilizes FormData to send multipart/form-data requests for uploading images.

Troubleshooting

  • Common issues:

    • Incorrect or missing Target ID (User ID or Page ID) will cause the API to reject the request.
    • Binary property names must match exactly the names of the binary data fields in the input items.
    • Network or authentication errors if the Facebook Poster API URL or credentials are misconfigured.
    • If no images are provided in the collection, the request will fail.
  • Error messages:

    • Errors thrown during execution include descriptive messages such as "Error when executing operation postMultiplePhotos: [message]".
    • If the node is set to continue on failure, errors are returned in the output JSON under the error key.
  • Resolutions:

    • Verify that the Target ID corresponds to a valid Facebook profile or page.
    • Ensure binary properties exist and contain valid image data.
    • Confirm API credentials and endpoint URL are correctly set.
    • Provide at least one image in the images collection.

Links and References

Discussion