🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

n8n-nodes-facebook-comments

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-nodes-facebook-comments

n8n community node to manage Facebook Page comments via the Graph API: full CRUD operations, moderation, date filtering, and nested replies support.

latest
npmnpm
Version
0.3.4
Version published
Weekly downloads
63
-92.04%
Maintainers
1
Weekly downloads
 
Created
Source

n8n Community Node: Facebook Page Comments

Manage Facebook Page comments via the Graph API: list page comments, list replies, and reply inline with tagging and image attachments.

Features

  • List Page comments with pagination and fields
  • Reply to a comment with text
  • Tag entities via message_tags (advanced)
  • Attach image by URL or by binary upload (unpublished photo -> attachment_id)
  • List replies to a comment
  • Load Options to select one of your managed Pages
  • Dynamic or static Page ID with fallback to credential default
  • Credential test via GET /me

Install

  • In n8n, go to Settings > Community Nodes > Install and search for "n8n-nodes-facebook-comments".
  • Or install via env var N8N_COMMUNITY_PACKAGES or by running npm install n8n-nodes-facebook-comments in your n8n directory.

Requirements

  • Node.js 18+
  • n8n 1.0+
  • Facebook App with proper permissions:
    • pages_read_engagement
    • pages_manage_engagement
    • pages_manage_posts (for uploading photos)
    • pages_show_list (to list Pages)
    • pages_read_user_content (optional for breadth)
  • A Page access token for posting replies. A user token may pass the credential test, but replies require a Page token.

Credentials

Getting Started

Need help getting an access token? See the detailed Facebook Authentication Guide.

Quick Setup

  • Access Token: Page access token (not user token). Long-lived tokens recommended.
  • Default Page ID: Optional fallback used when node field is not provided.
  • API Version: Select Graph API version (v19.0–v24.0).

OAuth2 Alternative

You can also use OAuth2 authentication for automatic token management.

Operations

Read Operations

  • List Page Comments (GET /{page-id}/comments)
    • Return All or Limit
    • Fields: comma-separated list (e.g. id,from,message,created_time,permalink_url,attachment,comment_count,like_count)
    • Include All Replies: Optionally fetch all replies for each comment
    • Date Filtering: Filter by Since/Until dates
  • List Replies to a Comment (GET /{comment-id}/comments)
    • Return All or Limit
    • Fields: similar to above

Write Operations

  • Reply to Comment (POST /{comment-id}/comments)

    • Message (required)
    • Additional Fields
      • Attachment URL: public image URL
      • Binary Property: upload from incoming binary data, unpublished to /{page-id}/photos, then uses attachment_id
      • Message Tags (JSON): advanced tagging array
  • Edit Comment (POST /{comment-id})

    • Update message text
    • Update attachment URL
    • Update message tags
  • Delete Comment (DELETE /{comment-id})

    • Permanently delete a comment or reply

Moderation Operations

  • Hide Comment (POST /{comment-id})
    • Hide a comment from public view
  • Unhide Comment (POST /{comment-id})
    • Make a hidden comment visible again

Engagement Operations

  • Like Comment (POST /{comment-id}/likes)
    • Like a comment as the Page
  • Unlike Comment (DELETE /{comment-id}/likes)
    • Remove a like from a comment

Usage

  • Add the Facebook Comments node.
  • Choose an Operation.
  • For listing page comments, provide Page ID manually, select from your Pages, or rely on Default Page ID in credentials.
  • For replies with binary image, a Page ID is required (for the photo upload step).
  • Map your token/fields and run the node.

Tagging

  • Provide "Message Tags (JSON)" as a JSON array. Example: [{"id":"<OBJECT_ID>","offset":0,"length":4,"type":"user"}]
  • Facebook validates whether IDs and types are taggable in the given context.

Attachments

  • attachment_url: Provide a public HTTPS image URL.
  • Binary Property: Pass binary from previous nodes. The node will upload an unpublished photo to /{page-id}/photos and use attachment_id in the reply.

Pagination

  • The node follows paging.next until the requested amount is collected or Return All is satisfied.

API Versions

Troubleshooting

  • 400/403 when replying: ensure you are using a Page access token and the app has the required permissions approved in App Review.
  • Image upload fails: verify pages_manage_posts permission and that the binary property contains an image.
  • Listing Pages empty: ensure pages_show_list permission and the user has access to the Page.

Development

  • Clone this repo, then:
    npm install
    npm run build
    npm test
    
  • Node classes:
    • src/credentials/FacebookGraphApi.credentials.ts
    • src/credentials/FacebookGraphOAuth2Api.credentials.ts
    • src/nodes/FacebookComments.node.ts

Testing

  • Run tests: npm test
  • Watch mode: npm test:watch
  • Coverage: npm test:coverage

Contributing

See CONTRIBUTING.md for guidelines on how to contribute to this project.

License

MIT

Keywords

n8n

FAQs

Package last updated on 11 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts