> ## Documentation Index
> Fetch the complete documentation index at: https://ai-kb.automationanywhere.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Pages Toolkit

> List managed Facebook Pages and create text, photo, and video posts via OAuth

The **Facebook Pages** toolkit lets agents list Pages the connected user manages, read Page details, and create text/link posts, photo posts, and video posts (including optional scheduling). Authentication is **per-user OAuth** — each user connects their own Facebook account.

Add it on the agent **Toolkits** tab. The first use prompts the user to connect Facebook if they have not already.

## Prerequisites

* A Facebook account that manages the Page(s) the agent should use
* An agent you can edit
* Facebook / Meta OAuth configured for your organization (admin)
* Users who will chat with the agent must complete the Facebook OAuth connect flow when prompted

## Setup

1. Confirm an admin has configured the Meta app (App ID, App Secret, redirect URI, and Page scopes).
2. Open the agent → **Toolkits** → add **Facebook Pages**.
3. Save the agent. In **Chat**, connect Facebook when prompted and grant Page permissions.
4. `@`-mention Facebook Pages tools in the personality prompt for publishing tasks.

## Available tools

| Tool                  | Description                                                                                                     |
| --------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Get Pages**         | Lists Pages the connected user manages.                                                                         |
| **Get Page Info**     | Returns details for a Page.                                                                                     |
| **Create Page Post**  | Creates a text or link post. Optional schedule (Unix time, at least **10 minutes** ahead, within **6 months**). |
| **Create Page Photo** | Creates a photo post from a **public** image URL.                                                               |
| **Create Page Video** | Creates a video post from a public video URL (typical limits \~1 GB / 20 minutes). Optional schedule.           |

Tools accept an optional `page_id`; when omitted, the first managed Page is used.

## Use cases

* Publish a status update to a company Page from chat
* Schedule a launch post for a future time
* Post a product photo or video from a public CDN URL
* Confirm which Pages the signed-in user can manage

## Tips

* Media URLs must be **publicly reachable** by Meta’s servers.
* Prefer an explicit `page_id` when the user manages multiple Pages.
* Production Meta apps may require App Review for Page publish permissions.
* Access is limited to Pages the **connected Facebook user** can manage.

## Troubleshooting

| Symptom                   | What to check                                                                           |
| ------------------------- | --------------------------------------------------------------------------------------- |
| OAuth / permission errors | Reconnect Facebook; confirm `pages_show_list`, `pages_manage_posts`, and related scopes |
| Wrong Page used           | Pass `page_id` from **Get Pages**                                                       |
| Photo/video post fails    | Confirm the media URL is public and within size/duration limits                         |
| Schedule rejected         | Schedule at least 10 minutes ahead and within 6 months                                  |

## Related

* [WhatsApp](/agents/toolkits/whatsapp)
* [Toolkits overview](/agents/toolkits/overview)
