# Facebook

Your Toolhouse AI Worker can connect to Facebook using 43 specialized tools.

## Auth Connection

This service requires an auth connection to use its tools. You can set this up in your Toolhouse dashboard under [Auth Connections](https://toolhouse.app/auth-connections?authkit_slugs=facebook).

## Tools (43)

### `Facebook Assign Page Task`

Integration name: **FACEBOOK\_ASSIGN\_PAGE\_TASK**

Assigns tasks/roles to a business-scoped user or system user for a specific Facebook Page. Important: This action requires a business-scoped user ID or system user ID from Facebook Business Manager. Regular Facebook user IDs cannot be used. The page must also be managed through Facebook Business Manager for this action to work. Required permissions: business\_management, pages\_manage\_metadata

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                              |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `user`    | string |     ✅    | —       | The business-scoped user ID or system user ID to assign tasks to. Note: Regular Facebook user IDs are not accepted - only business-scoped IDs (from Business Manager) or system user IDs can be used with this endpoint. |
| `tasks`   | array  |     ✅    | —       | List of tasks to assign. Valid values include: 'MANAGE', 'CREATE\_CONTENT', 'MODERATE', 'ADVERTISE', 'ANALYZE', 'MESSAGING'. Example: \['MANAGE', 'CREATE\_CONTENT']                                                     |
| `page_id` | string |     ✅    | —       | The ID of the Facebook Page                                                                                                                                                                                              |

***

### `Facebook Create Comment`

Integration name: **FACEBOOK\_CREATE\_COMMENT**

Creates a comment on a Facebook post or replies to an existing comment.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter              | Type   | Required | Example | Description                                                                                                                                                                                                                          |
| ---------------------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `message`              | string |     ✅    | —       | The text content of the comment                                                                                                                                                                                                      |
| `object_id`            | string |     ✅    | —       | The ID of the post or comment to comment on. Must be a numeric ID (e.g., '3071372469667482') or compound format 'pageId\_postId' (e.g., '678465505624869\_3071372469667482'). Do not include prefixes like 'post\_', 'id\_', or 'p'. |
| `attachment_id`        | string |          | —       | ID of an unpublished photo to attach to the comment                                                                                                                                                                                  |
| `attachment_url`       | string |          | —       | URL of a photo to attach to the comment                                                                                                                                                                                              |
| `attachment_share_url` | string |          | —       | URL of a GIF to attach to the comment                                                                                                                                                                                                |

***

### `Facebook Create Photo Album`

Integration name: **FACEBOOK\_CREATE\_PHOTO\_ALBUM**

Creates a new photo album on a Facebook Page. Note: This endpoint requires the 'pages\_manage\_posts' permission or equivalent permissions to be granted to your Facebook application. This action is publicly visible on the Page; confirm with the user before calling.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter  | Type   | Required | Example | Description                                                                                                 |
| ---------- | ------ | :------: | ------- | ----------------------------------------------------------------------------------------------------------- |
| `name`     | string |     ✅    | —       | Name of the photo album                                                                                     |
| `message`  | string |          | —       | Description of the album                                                                                    |
| `page_id`  | string |     ✅    | —       | The ID of the Facebook Page Must be a Facebook Page ID — personal profile or user timeline IDs are invalid. |
| `privacy`  | object |          | —       | Privacy settings for the album (e.g., {'value': 'EVERYONE'})                                                |
| `location` | string |          | —       | Location associated with the album                                                                          |

***

### `Facebook Create Photo Post`

Integration name: **FACEBOOK\_CREATE\_PHOTO\_POST**

Creates a photo post on a Facebook Page. Requires an image to be provided via either 'url' (publicly accessible image URL) or 'photo' (local image file upload). This action is specifically for posting images with optional captions, not text-only posts. Returns a composite post\_id (PageID\_PostID); use this for follow-up operations, not the photo/media id alone.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                    | Type    | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------- | ------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`                        | string  |          | —       | URL of a publicly accessible image to upload. Supports direct image links with or without file extensions (e.g., <https://example.com/image.jpg> or hash-based URLs from services like Imgur, Gyazo, Postimages). The image host must not block requests from Facebook. Cannot be a Facebook URL. At least one of 'url', 'photo', or 'media' is required. The URL must return an image MIME type directly — redirects or HTML pages cause upload failures. |
| `media`                      | object  |          | —       | Alias for 'photo'. for uploading a local image file (e.g..jpg.png.gif). At least one of 'media', 'photo', or 'url' is required.                                                                                                                                                                                                                                                                                                                            |
| `photo`                      | object  |          | —       | for uploading a local image file (e.g..jpg.png.gif). At least one of 'photo', 'url', or 'media' is required.                                                                                                                                                                                                                                                                                                                                               |
| `message`                    | string  |          | —       | Caption text for the photo. Can also be provided as 'caption'.                                                                                                                                                                                                                                                                                                                                                                                             |
| `page_id`                    | string  |     ✅    | —       | The numeric ID of the Facebook Page to post to. Can be provided as a string or number.                                                                                                                                                                                                                                                                                                                                                                     |
| `published`                  | boolean |          | —       | Set to true to publish immediately, false to save as unpublished                                                                                                                                                                                                                                                                                                                                                                                           |
| `backdated_time`             | integer |          | —       | Unix timestamp to backdate the post                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `scheduled_publish_time`     | integer |          | —       | Unix timestamp for scheduled posts (required if published=false) Must be a future UTC epoch timestamp. Providing this with published=true triggers a 400 validation error.                                                                                                                                                                                                                                                                                 |
| `backdated_time_granularity` | string  |          | —       | Granularity of backdated time: year, month, day, hour, or min                                                                                                                                                                                                                                                                                                                                                                                              |

***

### `Facebook Create Post`

Integration name: **FACEBOOK\_CREATE\_POST**

Creates a new text or link post on a Facebook Page. Requires `pages_manage_posts` permission and manage-level Page role on the target Page. For image posts use FACEBOOK\_CREATE\_PHOTO\_POST; for video posts use FACEBOOK\_CREATE\_VIDEO\_POST — media fields are not supported here. Returns a composite post ID in `PageID_PostID` format, required for FACEBOOK\_GET\_POST retrieval.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                | Type    | Required | Example | Description                                                                                                                                                                                                                                                          |
| ------------------------ | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `link`                   | string  |          | —       | URL to include in the post                                                                                                                                                                                                                                           |
| `message`                | string  |     ✅    | —       | The text content of the post At least one of `message` or `link` must be non-empty; omitting both causes a validation error.                                                                                                                                         |
| `page_id`                | string  |     ✅    | —       | The numeric ID of the Facebook Page to post to. This is a numeric string (e.g., '123456789012345'). To obtain a valid page\_id, use the 'Get User Pages' or 'List Managed Pages' action which returns page IDs for pages you have access to manage.                  |
| `published`              | boolean |          | —       | Set to true to publish immediately, false to save as draft or schedule                                                                                                                                                                                               |
| `targeting`              | object  |          | —       | Audience targeting specifications                                                                                                                                                                                                                                    |
| `scheduled_publish_time` | integer |          | —       | Unix timestamp for when the post should be published. Must be at least 10 minutes in the future. When provided, published must be false (will be auto-set to false if true). Must be Unix UTC epoch (not local time); timezone mismatches cause validation failures. |

***

### `Facebook Create Video Post`

Integration name: **FACEBOOK\_CREATE\_VIDEO\_POST**

Creates a video post on a Facebook Page. Requires a Page access token with `pages_manage_posts` scope and manage-level permissions on the target page.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                | Type    | Required | Example | Description                                                                                                                                                                                                                                                |
| ------------------------ | ------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title`                  | string  |          | —       | Title of the video                                                                                                                                                                                                                                         |
| `video`                  | object  |          | —       | Local video file to upload. At least one of 'video' or 'file\_url' must be provided.                                                                                                                                                                       |
| `page_id`                | string  |     ✅    | —       | The ID of the Facebook Page Must be a Facebook Page ID (not a personal profile ID); the authenticated token must have manage-level access.                                                                                                                 |
| `file_url`               | string  |          | —       | URL of the video file to upload. At least one of 'file\_url' or 'video' must be provided. Must be a direct download URL (e.g., direct MP4 link), not a watch/share URL. Use MP4 with H.264/AAC encoding; unsupported formats or very large files may fail. |
| `published`              | boolean |          | —       | Whether to publish immediately                                                                                                                                                                                                                             |
| `targeting`              | object  |          | —       | Audience targeting specifications                                                                                                                                                                                                                          |
| `description`            | string  |          | —       | Description of the video                                                                                                                                                                                                                                   |
| `scheduled_publish_time` | integer |          | —       | Unix timestamp to schedule the video post Requires `published=false`; must be a UTC Unix epoch at least \~10 minutes in the future. Combining with `published=true` or omitting when `published=false` causes 400 errors.                                  |

***

### `Facebook Delete Comment`

Integration name: **FACEBOOK\_DELETE\_COMMENT**

Deletes a Facebook comment. Requires a Page Access Token with appropriate permissions for comments on Page-owned content. The page\_id parameter helps ensure the correct page token is used for authentication.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter    | Type   | Required | Example | Description                                                                                                                                                                                                            |
| ------------ | ------ | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page_id`    | string |          | —       | Optional: The ID of the Facebook Page that owns the post containing this comment. If not provided, the action will use the first available managed page. Providing the correct page\_id ensures proper authentication. |
| `comment_id` | string |     ✅    | —       | The ID of the comment to delete. Can be in format 'parentId\_commentId' (e.g., '122157027176937815\_1371138271476143') or just the comment ID.                                                                         |

***

### `Facebook Delete Post`

Integration name: **FACEBOOK\_DELETE\_POST**

Permanently deletes a Facebook Page post. Deletion is irreversible — deleted posts cannot be recovered. For bulk deletions, keep throughput to \~1 delete/second to avoid Graph API rate limits.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                       |
| --------- | ------ | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `post_id` | string |     ✅    | —       | The ID of the post to delete The token must have Page-level delete permissions for this post. Posts created by other users or requiring elevated Page roles may not be deletable. |

***

### `Facebook Get Comment`

Integration name: **FACEBOOK\_GET\_COMMENT**

Retrieves details of a specific Facebook comment.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter    | Type   | Required | Example | Description                              |
| ------------ | ------ | :------: | ------- | ---------------------------------------- |
| `fields`     | string |          | —       | Comma-separated list of fields to return |
| `comment_id` | string |     ✅    | —       | The ID of the comment to retrieve        |

***

### `Facebook Get Comments`

Integration name: **FACEBOOK\_GET\_COMMENTS**

Retrieves comments from a Facebook post or comment (for replies). This endpoint requires appropriate permissions: - For page-owned posts: A Page Access Token with 'pages\_read\_engagement' permission - The API automatically swaps user tokens for page tokens when available API Version: Uses v23.0 which was released May 2025.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter   | Type    | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                |
| ----------- | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`     | integer |          | —       | Number of comments to return (max 100)                                                                                                                                                                                                                                                                                                                                     |
| `order`     | string  |          | —       | Order of comments: 'chronological' (oldest first) or 'reverse\_chronological' (newest first, default).                                                                                                                                                                                                                                                                     |
| `fields`    | string  |          | —       | Comma-separated list of fields to return for each comment. Available fields: id, message, created\_time, from, attachment, comment\_count, like\_count, is\_hidden, user\_likes, can\_comment, can\_remove, can\_hide, permalink\_url, parent, comments (for nested replies). Note: 'from' field requires a Page Token to access user information (since Graph API v2.11). |
| `filter`    | string  |          | —       | Filter comments by type: 'stream' returns all comments including replies in flat list (default), 'toplevel' returns only top-level comments without replies.                                                                                                                                                                                                               |
| `object_id` | string  |     ✅    | —       | The ID of the post or comment to get comments from. Must be in full format 'pageId\_postId' for posts (e.g., '123456789\_987654321'). For comments, use the comment ID directly.                                                                                                                                                                                           |

***

### `Facebook Get Conversation Messages`

Integration name: **FACEBOOK\_GET\_CONVERSATION\_MESSAGES**

Retrieves messages from a specific conversation.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter         | Type    | Required | Example | Description                                                                                                                                                                                                                                                  |
| ----------------- | ------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `limit`           | integer |          | —       | Number of messages to return (max 25) To retrieve full histories, paginate using `paging.cursors.after` or the `next` URL from the response.                                                                                                                 |
| `fields`          | string  |          | —       | Comma-separated list of fields to return for each message. Available fields include: id, created\_time, from, to, message, attachments, sticker, shares, tags.                                                                                               |
| `page_id`         | string  |     ✅    | —       | The ID of the Facebook Page that owns the conversation. Required to obtain the correct page access token. Get this from the List Managed Pages action.                                                                                                       |
| `conversation_id` | string  |     ✅    | —       | The ID of the conversation in the format 't\_' followed by a numeric ID (e.g., 't\_3638640842939952'). Obtain valid conversation IDs from the Get Page Conversations action. If a numeric-only ID is provided, the 't\_' prefix will be added automatically. |

***

### `Facebook Get Current User`

Integration name: **FACEBOOK\_GET\_CURRENT\_USER**

Validates the access token and retrieves the authenticated user's own profile via /me. Cannot fetch arbitrary users by name or ID.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fields`  | string |          | —       | Comma-separated list of fields to return for the current user Fields are silently omitted or return null if the access token lacks the required Facebook permissions — including defaults like `email`. Handle missing fields defensively. |

***

### `Facebook Get Message Details`

Integration name: **FACEBOOK\_GET\_MESSAGE\_DETAILS**

Retrieves details of a specific message sent or received by the Page.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter    | Type   | Required | Example | Description                                   |
| ------------ | ------ | :------: | ------- | --------------------------------------------- |
| `fields`     | string |          | —       | Comma-separated list of fields to return      |
| `message_id` | string |     ✅    | —       | The ID of the message to retrieve details for |

***

### `Facebook Get Page Conversations`

Integration name: **FACEBOOK\_GET\_PAGE\_CONVERSATIONS**

Retrieves a list of conversations between users and the Page.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                              |
| --------- | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | integer |          | —       | Number of conversations to return (max 25) Use `paging.cursors.after` or `paging.next` from the response to paginate beyond the first page.              |
| `fields`  | string  |          | —       | Comma-separated list of fields to return for each conversation Avoid requesting heavy nested fields (e.g., embedded messages) to prevent large payloads. |
| `page_id` | string  |     ✅    | —       | The ID of the Facebook Page. Numeric IDs are accepted and will be converted to strings.                                                                  |

***

### `Facebook Get Page Details`

Integration name: **FACEBOOK\_GET\_PAGE\_DETAILS**

Fetches details about a specific Facebook Page.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fields`  | string |          | —       | Comma-separated list of fields to return for the Page. Common valid fields include: id, name, about, category, description, fan\_count, followers\_count, website, link, username, is\_published, access\_token, emails, phone, location, hours, cover, picture, engagement, verification\_status, and many more. IMPORTANT: The following fields are NOT valid for direct Page queries and will be automatically filtered out: 'tasks' (only available via /me/accounts endpoint - use FACEBOOK\_LIST\_MANAGED\_PAGES to get page tasks), 'created\_time' (not supported on all page node types such as ProfileDelegatePage). For a complete list of valid Page fields, refer to the Facebook Graph API Page reference. |
| `page_id` | string |     ✅    | —       | The unique numeric ID of the Facebook Page to get details for. This must be a valid Facebook Page ID that the authenticated user has access to view. Facebook Page IDs are numeric strings typically 15-16 digits long (e.g., '678594635343968'). To find valid page IDs you have access to, first use the FACEBOOK\_LIST\_MANAGED\_PAGES or FACEBOOK\_GET\_USER\_PAGES actions to retrieve a list of pages you manage, which will include their IDs. You can also find a page's ID in its Facebook URL (e.g., <https://www.facebook.com/123456789012345>) or in the Page's 'About' section. Do not use arbitrary numbers, timestamps, bank account numbers, or other non-Facebook identifiers.                          |

***

### `Facebook Get Page Insights`

Integration name: **FACEBOOK\_GET\_PAGE\_INSIGHTS**

Retrieves analytics and insights for a Facebook Page. Returns metrics like impressions, page views, fan counts, and engagement data. Empty objects (`{}`) in results indicate missing data, not zero values. High-volume calls risk Graph API rate limits (error codes 4/613).

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------- | ------ | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `since`   | string |          | —       | Start of date range as Unix timestamp (e.g., '1704067200'), ISO 8601 datetime (e.g., '2024-10-01T00:00:00+0000', '2024-10-01'), or strtotime-compatible string (e.g., 'yesterday', '-7 days'). Maximum range is 90 days when combined with 'until'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `until`   | string |          | —       | End of date range as Unix timestamp (e.g., '1704672000'), ISO 8601 datetime (e.g., '2025-01-29T05:12:31+0000', '2025-01-29'), or strtotime-compatible string (e.g., 'now', '-1 day'). Maximum range is 90 days when combined with 'since'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `period`  | string |          | —       | Period for the metrics: day, week, days\_28, month, lifetime Using `lifetime` with bounded `since`/`until` ranges produces misleading or empty results. Standardize all date inputs to UTC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `metrics` | string |          | —       | Comma-separated list of metrics to retrieve. VALID METRICS: page\_follows (total followers), page\_daily\_follows\_unique (new follows), page\_daily\_unfollows\_unique (unfollows), page\_media\_view (content views), page\_post\_engagements (engagement count), page\_video\_views (video views), page\_total\_actions (CTA clicks), page\_actions\_post\_reactions\_total (reactions breakdown). DEPRECATED (will be auto-replaced): page\_impressions -> page\_media\_view, page\_fans -> page\_follows, page\_engaged\_users -> page\_post\_engagements, page\_fan\_adds -> page\_daily\_follows\_unique. Individual reaction metrics (page\_actions\_post\_reactions\_like\_total, etc.) are deprecated; use page\_actions\_post\_reactions\_total instead. Not all metric/period combinations are valid; incompatible combinations return empty data — reduce metrics list or adjust period if this occurs. |
| `page_id` | string |     ✅    | —       | The ID of the Facebook Page Must be a numeric Page ID; page names, URLs, and personal profile IDs are invalid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

***

### `Facebook Get Page Photos`

Integration name: **FACEBOOK\_GET\_PAGE\_PHOTOS**

Retrieves photos from a Facebook Page. CDN-based URLs (including `source`) are time-limited and expire; download and persist images promptly if long-term access is needed.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------- | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`    | string  |          | —       | Filter by photo type: uploaded, tagged                                                                                                                                                                                                                                                                                                                                                                                                             |
| `limit`   | integer |          | —       | Number of photos to return (max 100) Use paging cursors from the response to iterate through all available photos in large libraries; limit=100 does not guarantee all photos are returned in one call.                                                                                                                                                                                                                                            |
| `fields`  | string  |          | —       | Comma-separated list of valid Photo fields to return. Valid fields include: id, created\_time, updated\_time, name, images, height, width, picture, link, icon, from, album, backdated\_time, place, page\_story\_id, target, event, can\_delete, can\_tag, webp\_images. NOTE: 'reactions' and 'comments' are NOT valid fields - they are edges that must be accessed via separate API calls (e.g., /{photo-id}/reactions, /{photo-id}/comments). |
| `page_id` | string  |     ✅    | —       | The numeric ID of the Facebook Page (e.g., '678594635343968'). You can obtain page IDs using the FACEBOOK\_LIST\_MANAGED\_PAGES action. Do NOT pass datetime strings, timestamps, or date values - only valid Facebook page IDs.                                                                                                                                                                                                                   |

***

### `Facebook Get Page Posts`

Integration name: **FACEBOOK\_GET\_PAGE\_POSTS**

Retrieves posts from a Facebook Page. Endpoint choice: Uses /{page\_id}/feed instead of /posts or /published\_posts because: - /feed returns all content on page timeline (page's posts + visitor posts + tagged posts) - /posts returns only posts created by the page itself - /published\_posts returns only published posts by the page (excludes scheduled/unpublished) The /feed endpoint provides the most comprehensive view of page activity. Pagination: follow paging.cursors.after or paging.next across multiple calls until no next cursor exists. Throttling: high-volume pagination can trigger Graph API errors 4 and 613; use backoff between requests. API Version: Uses v23.0 (released May 2025). v20.0 and earlier will be deprecated by Meta. See: <https://developers.facebook.com/docs/graph-api/changelog>

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                   | Type    | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------- | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`                     | integer |          | —       | Number of posts to return (max 100)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `since`                     | string  |          | —       | Filter posts updated after this time. Accepts: Unix timestamp (e.g., '1705320000'), strtotime values (e.g., 'yesterday', '7 days ago', 'last week'), or datetime strings (e.g., '2024-01-15', '2024-01-15T12:00:00'). Datetime strings are automatically converted to Unix timestamps.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `until`                     | string  |          | —       | Filter posts updated before this time. Accepts: Unix timestamp (e.g., '1705320000'), strtotime values (e.g., 'yesterday', '7 days ago', 'last week'), or datetime strings (e.g., '2024-01-15', '2024-01-15T12:00:00'). Datetime strings are automatically converted to Unix timestamps.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `fields`                    | string  |          | —       | Comma-separated list of fields to return for each post. Supported fields include: id, message, created\_time, updated\_time, permalink\_url, attachments, story, from, status\_type, full\_picture, shares, reactions, comments, is\_hidden, is\_published. For summary counts, use '.summary(true)' syntax (e.g., 'reactions.summary(true)', 'comments.summary(true)', 'likes.summary(true)'). Note: 'type', 'link', 'source', 'picture', 'name', 'caption', 'description', and 'icon' are deprecated since Graph API v3.3 and will be automatically removed if requested. Response nests engagement data: extract reactions.summary.total\_count, comments.summary.total\_count, and shares.count; treat missing keys as zero. |
| `page_id`                   | string  |     ✅    | —       | The ID of the Facebook Page. Can be provided as a string or number. Must be a Facebook Page ID, not a personal profile or user ID — use FACEBOOK\_GET\_USER\_PAGES to obtain a valid Page ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `removed_deprecated_fields` | array   |          | —       | Internal field to track deprecated fields that were automatically removed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

***

### `Facebook Get Page Roles`

Integration name: **FACEBOOK\_GET\_PAGE\_ROLES**

Retrieves a list of people and their tasks/roles on a Facebook Page. The connected account must have management access to the target Page; otherwise the response may be empty or incomplete. Returned role types include MANAGE and CREATE\_CONTENT — verify these before calling tools like FACEBOOK\_UPDATE\_PAGE\_SETTINGS. Recently changed roles may take time to propagate; retry if role data appears stale after an update.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                     |
| --------- | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `after`   | string  |          | —       | Cursor string for forward pagination. Use the 'after' cursor from a previous response's paging.cursors.after field to retrieve the next page of results.        |
| `limit`   | integer |          | —       | Maximum number of roles to return per request.                                                                                                                  |
| `before`  | string  |          | —       | Cursor string for backward pagination. Use the 'before' cursor from a previous response's paging.cursors.before field to retrieve the previous page of results. |
| `page_id` | string  |     ✅    | —       | The ID of the Facebook Page                                                                                                                                     |

***

### `Facebook Get Page Tagged Posts`

Integration name: **FACEBOOK\_GET\_PAGE\_TAGGED\_POSTS**

Retrieves posts where a Facebook Page is tagged or mentioned. Use when monitoring brand mentions or tracking posts that tag your Page but don't appear on your Page's own feed.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                                                                                                                                             |
| --------- | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | integer |          | —       | Number of posts to return (max 100)                                                                                                                                                                                                                                                     |
| `since`   | string  |          | —       | Filter posts updated after this time. Accepts: Unix timestamp (e.g., '1705320000'), strtotime values (e.g., 'yesterday', '7 days ago', 'last week'), or datetime strings (e.g., '2024-01-15', '2024-01-15T12:00:00'). Datetime strings are automatically converted to Unix timestamps.  |
| `until`   | string  |          | —       | Filter posts updated before this time. Accepts: Unix timestamp (e.g., '1705320000'), strtotime values (e.g., 'yesterday', '7 days ago', 'last week'), or datetime strings (e.g., '2024-01-15', '2024-01-15T12:00:00'). Datetime strings are automatically converted to Unix timestamps. |
| `fields`  | string  |          | —       | Comma-separated list of fields to return for each post                                                                                                                                                                                                                                  |
| `page_id` | string  |     ✅    | —       | The ID of the Facebook Page. Can be provided as a string or number.                                                                                                                                                                                                                     |

***

### `Facebook Get Page Videos`

Integration name: **FACEBOOK\_GET\_PAGE\_VIDEOS**

Retrieves videos from a Facebook Page.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                                                                                              |
| --------- | ------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`    | string  |          | —       | Filter by video type: uploaded, tagged                                                                                                                                                                                                   |
| `limit`   | integer |          | —       | Number of videos to return (max 100) Controls only the first batch; iterate through paging cursors (`paging.cursors.after`) until no `next` page is returned to retrieve all videos.                                                     |
| `fields`  | string  |          | —       | Comma-separated list of fields to return for each video The `source` field returns time-limited URLs; download or process promptly rather than storing for later use.                                                                    |
| `page_id` | string  |     ✅    | —       | The numeric ID of the Facebook Page. This is a numeric string (e.g., '123456789012345'). To obtain a valid page\_id, use the 'Get User Pages' or 'List Managed Pages' action which returns page IDs for pages you have access to manage. |

***

### `Facebook Get Post`

Integration name: **FACEBOOK\_GET\_POST**

Retrieves details of a specific Facebook post.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------- | ------ | :------: | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fields`  | string |          | —       | Comma-separated list of fields to return. Common fields: id, message, created\_time, updated\_time, permalink\_url, from, attachments, shares, story, picture, full\_picture, place, privacy, status\_type. For engagement metrics with counts, use edge.summary(true) syntax. CORRECT: likes.summary(true), comments.summary(true), reactions.summary(true). WRONG: likes.summary(total\_count) - using 'total\_count' as parameter causes API syntax errors. The 'true' parameter enables the summary, and total\_count is returned in the response automatically. Note: Legacy post fields (name, link, description, type) are deprecated; use 'attachments' edge instead. |
| `post_id` | string |     ✅    | —       | The ID of the post to retrieve. Must be in full format: 'pageId\_postId' where both pageId and postId are numeric (e.g., '123456789\_987654321'). Page-scoped IDs (alphanumeric strings like '1ANtnBaCHX' or '17GandZR1N') are not supported. Use FACEBOOK\_GET\_PAGE\_POSTS to obtain valid full-format post IDs.                                                                                                                                                                                                                                                                                                                                                            |

***

### `Facebook Get Post Insights`

Integration name: **FACEBOOK\_GET\_POST\_INSIGHTS**

Retrieves analytics and insights for a specific Facebook post. Returns metrics like impressions, clicks, and engagement data. Very new posts may return empty metric values; allow a short delay before querying and treat absent fields as partial data.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `period`  | string |          | —       | Period for the metrics (only applicable for some metrics): lifetime Supports since/until parameters in UTC; convert from user timezone to avoid misleading aggregates when comparing posts across time windows.                                                                                                                                                                                                                                                                                                           |
| `metrics` | string |          | —       | Comma-separated list of metrics to retrieve. Valid metric: post\_media\_view (the number of times the post entered a person's screen). Note: Older metrics like post\_impressions, post\_impressions\_unique, post\_clicks, post\_engagements, post\_engaged\_users, post\_reactions\_by\_type\_total were deprecated by Facebook as of November 15, 2025 and are no longer supported. Request only needed metrics to reduce payload size and avoid rate limit errors (error codes 4/613) when iterating over many posts. |
| `post_id` | string |     ✅    | —       | The ID of the post to get insights for                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

***

### `Facebook Get Post Reactions`

Integration name: **FACEBOOK\_GET\_POST\_REACTIONS**

Retrieves reactions (like, love, wow, etc.) for a Facebook post. Very recent posts may return empty or partial reactions data; treat missing fields as incomplete coverage, not an error.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                          |
| --------- | ------- | :------: | ------- | -------------------------------------------------------------------- |
| `type`    | string  |          | —       | Filter by reaction type: LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL |
| `limit`   | integer |          | —       | Number of reactions to return (max 100)                              |
| `post_id` | string  |     ✅    | —       | The ID of the post to get reactions for                              |
| `summary` | boolean |          | —       | Include summary with total count per reaction type                   |

***

### `Facebook Get Scheduled Posts`

Integration name: **FACEBOOK\_GET\_SCHEDULED\_POSTS**

Retrieves scheduled and unpublished posts for a Facebook Page. Results are cursor-paginated; follow pagination cursors to retrieve all results beyond the limit. When searching for posts near a specific time, filter to a narrow (\~±5 minutes) window. Use this tool to check for existing entries before scheduling new posts to avoid duplicates.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                            |
| --------- | ------- | :------: | ------- | ------------------------------------------------------ |
| `limit`   | integer |          | —       | Number of posts to return (max 100)                    |
| `fields`  | string  |          | —       | Comma-separated list of fields to return for each post |
| `page_id` | string  |     ✅    | —       | The ID of the Facebook Page                            |

***

### `Facebook Get User Pages`

Integration name: **FACEBOOK\_GET\_USER\_PAGES**

DEPRECATED: Use FACEBOOK\_LIST\_MANAGED\_PAGES instead. Retrieves Facebook Pages the user manages (excludes personal profiles, groups, and non-Page entities); an empty `data` array means no manageable Pages exist. Requires `pages_show_list` scope; missing scopes yield empty `data` or OAuthException code 200. Results paginate \~100 items per page — follow `paging.cursors.after` or `next` until exhausted.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                    | Type    | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------- | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `after`                      | string  |          | —       | Cursor string for pagination. Use the 'after' cursor from a previous response's paging.cursors.after field to retrieve the next page of results.                                                                                                                                                                                                                                                                                                                                                    |
| `limit`                      | integer |          | —       | Maximum number of pages to return per request.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `fields`                     | string  |          | —       | Comma-separated list of fields to return for each page. Supported fields include: id, name, access\_token, tasks, category, category\_list, picture, link, fan\_count, followers\_count, is\_published, global\_brand\_page\_name, instagram\_business\_account, verification\_status, is\_webhooks\_subscribed. Always include `id` and `name` to avoid extra identity-resolution calls. Check `tasks` values before write actions — Page inclusion does not guarantee publish/manage permissions. |
| `user_id`                    | string  |          | —       | The ID of the user whose pages to retrieve. Defaults to 'me' for current user.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `composio_execution_message` | string  |          | —       | Execution message from preprocessing.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

***

### `Facebook Like Post Or Comment`

Integration name: **FACEBOOK\_LIKE\_POST\_OR\_COMMENT**

Adds a LIKE reaction to a Facebook post or comment. Note: Due to API limitations, only LIKE reactions can be added programmatically. This action is user-visible and irreversible — confirm with the user before calling.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter   | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------- | ------ | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`      | string |          | —       | Reaction type: Currently only LIKE is supported via API. Other reactions (LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL) cannot be added programmatically                                                                                                                                                                                                                                              |
| `object_id` | string |     ✅    | —       | The ID of the post or comment to react to. Facebook IDs are numeric strings (typically 15-20 digits). Must belong to a Page post or comment, not a personal profile timeline.IMPORTANT: Always pass IDs as strings to preserve precision. Integer values will be converted to strings, but float values (including scientific notation like 5.3e+32) are rejected because they lose precision. |

***

### `Facebook List Managed Pages`

Integration name: **FACEBOOK\_LIST\_MANAGED\_PAGES**

Retrieves a list of Facebook Pages that the user manages (not personal profiles), including page details, access tokens, and tasks. Requires `pages_show_list` or `pages_read_engagement` OAuth scopes; missing scopes silently return empty results rather than an error. An empty `data` array means the user manages no Pages. Results are paginated via `paging.cursors`; follow `paging.next` until absent to retrieve all Pages when count exceeds `limit`. Graph API throttling (error codes 4, 17, 613) can occur during pagination — use exponential backoff.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                     |
| --------- | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `after`   | string  |          | —       | Cursor string for forward pagination. Use the 'after' cursor from a previous response's paging.cursors.after field to retrieve the next page of results.        |
| `limit`   | integer |          | —       | Maximum number of pages to retrieve per request.                                                                                                                |
| `before`  | string  |          | —       | Cursor string for backward pagination. Use the 'before' cursor from a previous response's paging.cursors.before field to retrieve the previous page of results. |
| `fields`  | string  |          | —       | Comma-separated list of fields to return for each managed page.                                                                                                 |
| `user_id` | string  |          | —       | The ID of the user whose managed pages to retrieve. Defaults to 'me' for current user.                                                                          |

***

### `Facebook Mark Message Seen`

Integration name: **FACEBOOK\_MARK\_MESSAGE\_SEEN**

Marks a user's message as seen by the Page, visibly updating the read status in the user's conversation. Note: This action requires an active messaging session with the user. Facebook's messaging policy requires that users have messaged the Page within the last 24 hours for sender actions to work.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter      | Type   | Required | Example | Description                                      |
| -------------- | ------ | :------: | ------- | ------------------------------------------------ |
| `page_id`      | string |     ✅    | —       | The ID of the Facebook Page                      |
| `recipient_id` | string |     ✅    | —       | The ID of the user whose message to mark as seen |

***

### `Facebook Publish Scheduled Post`

Integration name: **FACEBOOK\_PUBLISH\_SCHEDULED\_POST**

Publishes a previously scheduled or unpublished Facebook post immediately. This action takes a scheduled or unpublished post and publishes it immediately by setting is\_published to true. The post must have been previously created with published=false or with a scheduled\_publish\_time. Requirements: - The post must exist and be in an unpublished/scheduled state - The user must have admin access to the page that owns the post - The app must have pages\_manage\_posts permission

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                                                            |
| --------- | ------ | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page_id` | string |          | —       | Optional: The ID of the Facebook Page that owns the post. If not provided, it will be extracted from the post\_id (the part before the underscore).                                    |
| `post_id` | string |     ✅    | —       | The ID of the scheduled/unpublished post to publish. Format is typically 'pageId\_postId' (e.g., '123456789\_987654321'). Use 'Get Scheduled Posts' action to find scheduled post IDs. |

***

### `Facebook Remove Page Task`

Integration name: **FACEBOOK\_REMOVE\_PAGE\_TASK**

Removes a user's tasks/access from a specific Facebook Page. Caller must have admin-level rights on the Page. Operates on one page\_id at a time; repeat for each page if removing from multiple pages. Partial access may remain if only some tasks are revoked.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type   | Required | Example | Description                                                                                                                                             |
| --------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user`    | string |     ✅    | —       | The ID or username of the user to remove Verify this matches the intended collaborator before calling; a mismatch revokes access for the wrong account. |
| `page_id` | string |     ✅    | —       | The ID of the Facebook Page                                                                                                                             |

***

### `Facebook Reschedule Post`

Integration name: **FACEBOOK\_RESCHEDULE\_POST**

Changes the scheduled publish time of an unpublished Facebook post. This action updates the scheduled\_publish\_time of a previously scheduled post. The post must have been created with published=false and a scheduled\_publish\_time.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                | Type    | Required | Example | Description                                                                                                                 |
| ------------------------ | ------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `post_id`                | string  |     ✅    | —       | The ID of the scheduled post to reschedule. Format is typically 'pageId\_postId' (e.g., '123456789\_987654321').            |
| `scheduled_publish_time` | integer |     ✅    | —       | New Unix timestamp for when to publish the post. Must be at least 10 minutes in the future and no more than 6 months ahead. |

***

### `Facebook Search Pages`

Integration name: **FACEBOOK\_SEARCH\_PAGES**

Searches for Facebook Pages based on a query string. Returns pages matching the search criteria with requested fields. DEPRECATION WARNING: The /pages/search endpoint was deprecated by Facebook in 2019 and is now ONLY available to Workplace by Meta apps. Standard Facebook apps will receive Error #10 (permission error) regardless of which permissions or features have been granted. For Workplace apps only - requires one of: - 'pages\_read\_engagement' permission - 'Page Public Content Access' feature - 'Page Public Metadata Access' feature Standard Facebook apps should use alternative methods to discover pages, such as: - Direct page ID lookup via /{page-id} endpoint - User's managed pages via /me/accounts endpoint Reference: <https://developers.facebook.com/docs/apps/review/feature#reference-PAGES\\_ACCESS>. Results include only Facebook Pages; personal profiles, groups, and other entity types are excluded.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter | Type    | Required | Example | Description                                                                                                                                                                               |
| --------- | ------- | :------: | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | integer |          | —       | Maximum number of results to return (max 100) A specific target page may not appear in a single response; refine the query string if the desired page is missing.                         |
| `query`   | string  |     ✅    | —       | Search query for finding pages (e.g., business name, topic, etc.)                                                                                                                         |
| `fields`  | string  |          | —       | Comma-separated list of fields to retrieve for each page Returned field data (e.g., fan\_count, location) can be sparse or outdated; avoid relying on a single field for selection logic. |

***

### `Facebook Send Media Message`

Integration name: **FACEBOOK\_SEND\_MEDIA\_MESSAGE**

Sends a media message (image, video, audio, or file) from the Page to a user.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type    | Required | Example | Description                                                                                                                                                    |
| ---------------- | ------- | :------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tag`            | string  |          | —       | Message tag required when messaging\_type is MESSAGE\_TAG. Valid tags include: CONFIRMED\_EVENT\_UPDATE, POST\_PURCHASE\_UPDATE, ACCOUNT\_UPDATE, HUMAN\_AGENT |
| `page_id`        | string  |     ✅    | —       | The ID of the Facebook Page sending the message                                                                                                                |
| `media_url`      | string  |     ✅    | —       | URL of the media to send                                                                                                                                       |
| `media_type`     | string  |     ✅    | —       | Type of media: image, video, audio, or file                                                                                                                    |
| `is_reusable`    | boolean |          | —       | Whether the attachment is reusable                                                                                                                             |
| `recipient_id`   | string  |     ✅    | —       | The ID of the message recipient (user ID or PSID)                                                                                                              |
| `messaging_type` | string  |          | —       | The messaging type - RESPONSE, UPDATE, or MESSAGE\_TAG                                                                                                         |

***

### `Facebook Send Message`

Integration name: **FACEBOOK\_SEND\_MESSAGE**

Sends a text message from a Facebook Page (not personal profiles) to a user via Messenger. Requires explicit user confirmation before calling, as this action delivers a message to a real end user.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter        | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                  |
| ---------------- | ------ | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `tag`            | string |          | —       | Required when messaging\_type is MESSAGE\_TAG. Valid tags: HUMAN\_AGENT (within 7 days of last user message for human agent responses), CONFIRMED\_EVENT\_UPDATE (for registered event updates), POST\_PURCHASE\_UPDATE (for purchase-related updates), ACCOUNT\_UPDATE (for non-recurring account changes). |
| `page_id`        | string |     ✅    | —       | The ID of the Facebook Page sending the message Must be a numeric page ID, not a username or alias.                                                                                                                                                                                                          |
| `message_text`   | string |     ✅    | —       | The text content of the message to send                                                                                                                                                                                                                                                                      |
| `recipient_id`   | string |     ✅    | —       | The ID of the message recipient (user ID or PSID) Must be a numeric PSID, not a username or display name.                                                                                                                                                                                                    |
| `messaging_type` | string |          | —       | The messaging type - RESPONSE, UPDATE, or MESSAGE\_TAG. Use RESPONSE within 24 hours of user's last message. Use MESSAGE\_TAG with a tag parameter to send outside the 24-hour window.                                                                                                                       |

***

### `Facebook Toggle Typing Indicator`

Integration name: **FACEBOOK\_TOGGLE\_TYPING\_INDICATOR**

Shows or hides the typing indicator for a user in Messenger.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter      | Type    | Required | Example | Description                                                             |
| -------------- | ------- | :------: | ------- | ----------------------------------------------------------------------- |
| `page_id`      | string  |     ✅    | —       | The ID of the Facebook Page                                             |
| `typing_on`    | boolean |     ✅    | —       | True to show typing indicator, False to hide it                         |
| `recipient_id` | string  |     ✅    | —       | The Page-Scoped ID (PSID) of the user to show/hide typing indicator for |

***

### `Facebook Unlike Post Or Comment`

Integration name: **FACEBOOK\_UNLIKE\_POST\_OR\_COMMENT**

Removes a like from a Facebook post or comment.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter   | Type   | Required | Example | Description                                                                                                                                                                                                                                                                                                           |
| ----------- | ------ | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object_id` | string |     ✅    | —       | The ID of the post or comment to unlike. Facebook IDs are numeric strings (typically 15-20 digits). IMPORTANT: Always pass IDs as strings to preserve precision. Integer values will be converted to strings, but float values (including scientific notation like 5.3e+32) are rejected because they lose precision. |

***

### `Facebook Update Comment`

Integration name: **FACEBOOK\_UPDATE\_COMMENT**

Updates an existing Facebook comment. IMPORTANT: This action requires a Page Access Token. The comment must belong to a post on a Page that you manage. Use the page\_id parameter to ensure the correct page token is used, especially if you manage multiple pages.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter    | Type    | Required | Example | Description                                                                                                                                                                                                                                 |
| ------------ | ------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message`    | string  |     ✅    | —       | The new text content of the comment                                                                                                                                                                                                         |
| `page_id`    | string  |          | —       | The ID of the Facebook Page that owns the comment. Required to ensure the correct page access token is used. If not provided, the action will attempt to use the first available page's token, which may fail if you manage multiple pages. |
| `is_hidden`  | boolean |          | —       | Whether to hide or unhide the comment                                                                                                                                                                                                       |
| `comment_id` | string  |     ✅    | —       | The ID of the comment to update. Format is typically 'objectId\_commentId' (e.g., '122157027176937815\_1371138271476143').                                                                                                                  |

***

### `Facebook Update Page Settings`

Integration name: **FACEBOOK\_UPDATE\_PAGE\_SETTINGS**

Updates settings for a specific Facebook Page. Requires the authenticated user to have MANAGE and CREATE\_CONTENT tasks for the target page; verify roles via FACEBOOK\_GET\_PAGE\_ROLES. Not all fields (about, description, general\_info, etc.) are available for every Page category.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter      | Type   | Required | Example | Description                           |
| -------------- | ------ | :------: | ------- | ------------------------------------- |
| `about`        | string |          | —       | Updated about section for the page    |
| `phone`        | string |          | —       | Updated phone number                  |
| `emails`       | array  |          | —       | Updated email addresses               |
| `page_id`      | string |     ✅    | —       | The ID of the Facebook Page to update |
| `website`      | string |          | —       | Updated website URL                   |
| `description`  | string |          | —       | Updated description for the page      |
| `general_info` | string |          | —       | Updated general information           |

***

### `Facebook Update Post`

Integration name: **FACEBOOK\_UPDATE\_POST**

Updates an existing Facebook Page post.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                 | Type   | Required | Example | Description                      |
| ------------------------- | ------ | :------: | ------- | -------------------------------- |
| `message`                 | string |          | —       | Updated text content of the post |
| `post_id`                 | string |     ✅    | —       | The ID of the post to update     |
| `og_phrase`               | string |          | —       | Open Graph phrase                |
| `og_icon_id`              | string |          | —       | Open Graph icon ID               |
| `og_object_id`            | string |          | —       | Open Graph object ID             |
| `og_action_type_id`       | string |          | —       | Open Graph action type ID        |
| `og_suggestion_mechanism` | string |          | —       | Open Graph suggestion mechanism  |

***

### `Facebook Upload Photo`

Integration name: **FACEBOOK\_UPLOAD\_PHOTO**

DEPRECATED: Use FACEBOOK\_CREATE\_PHOTO\_POST instead. Uploads a photo file directly to a Facebook Page. Supports local file upload up to 10MB.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                | Type    | Required | Example | Description                                                                                                                                                                                                                                                        |
| ------------------------ | ------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `url`                    | string  |          | —       | Public URL of the photo (must be accessible by Facebook servers). Alternative to 'photo'. Use this for images hosted on external servers. Must be a direct HTTPS endpoint returning an image MIME type; redirects, HTML pages, and non-HTTPS URLs fail validation. |
| `tags`                   | array   |          | —       | List of user tags with format \[{'tag\_uid': 'USER\_ID', 'x': 50, 'y': 50}]                                                                                                                                                                                        |
| `photo`                  | object  |          | —       | Photo file to upload (max 10MB). Alternative to 'url'. If a URL string is mistakenly passed here, it will be auto-converted to use the 'url' parameter.                                                                                                            |
| `caption`                | string  |          | —       | Caption for the photo                                                                                                                                                                                                                                              |
| `page_id`                | string  |     ✅    | —       | The ID of the Facebook Page. Can be provided as a string or number. Must be a Page ID; personal profile/user timeline IDs are not valid.                                                                                                                           |
| `published`              | boolean |          | —       | Whether to publish the photo immediately                                                                                                                                                                                                                           |
| `targeting`              | object  |          | —       | Audience targeting specifications                                                                                                                                                                                                                                  |
| `scheduled_publish_time` | integer |          | —       | Unix timestamp to schedule the post Requires `published=false`; value must be a future UTC epoch in seconds. Using `published=true` with this field causes validation errors.                                                                                      |

***

### `Facebook Upload Photos Batch`

Integration name: **FACEBOOK\_UPLOAD\_PHOTOS\_BATCH**

Uploads multiple photo files in batch to a Facebook Page or Album. Uses Facebook's batch API for efficient multi-photo upload. Maximum 50 photos per batch.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter    | Type    | Required | Example                                     | Description                                                                                                                                                                         |
| ------------ | ------- | :------: | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `photos`     | array   |          | —                                           | List of photo files to upload (max 50 photos)                                                                                                                                       |
| `page_id`    | string  |     ✅    | —                                           | The ID of the Facebook Page                                                                                                                                                         |
| `album_id`   | string  |          | —                                           | ID of album to add photos to. If not provided, photos will be uploaded to timeline                                                                                                  |
| `published`  | boolean |          | —                                           | Whether to publish the photos immediately To schedule, set to false and include `scheduled_publish_time` as a Unix UTC epoch timestamp; mismatched combinations trigger 400 errors. |
| `photo_urls` | array   |          | `["https://.../a.jpg","https://.../b.png"]` | List of photo URLs to upload (alternative to 'photos') Must be direct, publicly accessible HTTPS URLs — no redirects, private URLs, or HTTP.                                        |

***

### `Facebook Upload Video`

Integration name: **FACEBOOK\_UPLOAD\_VIDEO**

DEPRECATED: Use CreateVideoPost instead. Uploads a video file directly to a Facebook Page. Supports local file upload. For large videos (>100MB), uses resumable upload. After upload completes, the video enters a processing/pending state; do not reference or schedule it until processing finishes.

#### Parameters

Your Toolhouse AI worker will automatically pass these parameters as input when the tool is called.

| Parameter                | Type    | Required | Example | Description                                                                                                                                                              |
| ------------------------ | ------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `title`                  | string  |          | —       | Title of the video                                                                                                                                                       |
| `video`                  | object  |          | —       | Video file to upload (max 10GB, recommended under 1GB). Either 'video' or 'file\_url' must be provided. Use MP4 with H.264 video and AAC audio to avoid upload failures. |
| `page_id`                | string  |     ✅    | —       | The ID of the Facebook Page                                                                                                                                              |
| `file_url`               | string  |          | —       | URL of a publicly accessible video file to upload. Either 'file\_url' or 'video' must be provided. This is an alternative to uploading a local file.                     |
| `published`              | boolean |          | —       | Whether to publish immediately                                                                                                                                           |
| `targeting`              | object  |          | —       | Audience targeting specifications                                                                                                                                        |
| `description`            | string  |          | —       | Description of the video                                                                                                                                                 |
| `content_tags`           | array   |          | —       | List of content tags                                                                                                                                                     |
| `custom_labels`          | array   |          | —       | Custom labels for the video                                                                                                                                              |
| `scheduled_publish_time` | integer |          | —       | Unix timestamp to schedule the video post Requires `published=false`; combining with `published=true` triggers a 400 validation error.                                   |

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toolhouse.ai/toolhouse/integrations/facebook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
