Facebook Threads API icon

Facebook Threads API

Tương tác với Facebook Threads API

Overview

This node integrates with the Facebook Threads API to manage threads on the platform. It supports creating new threads, including text-only and carousel (multi-media) threads, retrieving thread details, deleting threads, posting new messages to existing threads, and replying to threads.

Common scenarios include:

  • Automating social media content publishing by creating threads with text and media.
  • Managing conversations by posting replies or additional posts to threads.
  • Fetching thread information for analytics or monitoring purposes.
  • Deleting outdated or unwanted threads programmatically.

Practical example:

  • A marketing team can schedule a series of promotional posts as threads with images or videos attached.
  • Customer support bots can reply automatically to user threads based on incoming queries.

Properties

Name Meaning
Text The main textual content of the thread to create. Required for "create" and "createCarousel".
Additional Fields Optional extra fields when creating, posting, or replying to a thread:
- Media URLs List of URLs pointing to media files (images/videos) to attach to the thread or post.
- Link URL A URL link to attach alongside the thread or post content.

Output

The node outputs an array of JSON objects representing the responses from the Facebook Threads API for each input item processed.

For the "create" operation, the output contains the published thread's metadata including its ID.

For "get", it returns detailed thread information such as id, message, creation time, comments, likes, and media.

For "post" and "reply", it returns the result of posting the message or reply.

For "delete", it returns confirmation of deletion.

If media is involved (images/videos), the node handles uploading via URLs but does not output binary data directly.

Dependencies

  • Requires a valid API authentication token for Facebook Threads API (access token).
  • Needs the API version specified in credentials.
  • Network access to https://graph.threads.net for API calls.
  • Properly configured n8n credentials containing the access token or OAuth token data.

Troubleshooting

  • Error: "Không nhận được container ID hợp lệ từ API"
    Means the API did not return a valid container ID after creating a thread. Check that the access token is valid and has required permissions.

  • Error: "Carousel cần ít nhất 2 media items"
    When creating a carousel thread, at least two media URLs must be provided.

  • Error: "Không thể tạo item container cho media: [URL]"
    Indicates failure to create a media container for one of the media URLs. Verify the media URLs are accessible and supported formats (jpg, jpeg, png, gif for images; mp4, mov, avi, wmv for videos).

  • Common issues include invalid or expired access tokens, insufficient permissions, or malformed input parameters.

  • If the node fails and "Continue On Fail" is enabled, errors will be returned in the output array under an error field.

Links and References

Discussion