fb_validate_pre_publish
Validate a Facebook post candidate against configurable guardrails including image requirement, banned topics, character limits, and duplicate content detection before publishing.
Instructions
Run all guard-rails BEFORE publishing.
Checks: - image_required (per-page config) - banned_topics (substring, accent-insensitive) - length (10..63206 chars) - anti_duplicate (Jaccard 4-grams vs recent posts, lookback per config)
Args: page_id: Numeric Meta Page ID. message: Candidate post text. image_url: Optional candidate image URL. fetch_recent: If True (default), fetches recent posts from Meta to run the anti-duplicate check. Set False to skip network. page_access_token: Optional page-scoped token (used only if fetch_recent).
Returns:
Dict with verdict ("go"|"block"), per-check details, errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ||
| message | Yes | ||
| image_url | No | ||
| fetch_recent | No | ||
| page_access_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||