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

# Publish Post

> Publishes a post to a Facebook Page: text, link, photo, video, reel, or a 24 hour story

Publishes a post to a Facebook Page: text, link, photo, video, reel, or a 24 hour story. Supports publishing immediately or scheduling for later (stories cannot be scheduled).

|                       |                         |
| --------------------- | ----------------------- |
| **App**               | Facebook                |
| **Operation ID**      | `facebook_publish_post` |
| **Type**              | Action                  |
| **Connection**        | `facebook` (required)   |
| **Credits per run**   | 1                       |
| **Requires approval** | Yes (write operation)   |

## Inputs

| Field                    | Type                        | Required | Default | Description                                                                                                                                                                                                                                                                                                                                       |
| ------------------------ | --------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page`                   | string or SelectItem        | Yes      | -       | Select the Facebook Page to publish to, ask the user for it if not provided                                                                                                                                                                                                                                                                       |
| `post_type`              | string or SelectableOption  | Yes      | -       | Type of post to publish. Available options: 'text' (message only), 'link' (message with a link preview), 'photo' (1 to 10 images), 'video' (regular feed video), 'reel' (vertical video), 'story' (24 hour story from ONE image or ONE video; no text and no scheduling, video stories are vertical 9:16 and roughly 3 to 60 seconds).            |
| `message`                | string                      | No       | -       | The post text. Required for text and link posts. For photo posts it becomes the caption, for videos and reels the description.                                                                                                                                                                                                                    |
| `link`                   | string                      | No       | -       | URL to share for link posts (e.g. `https://example.com`). Facebook renders a link preview.                                                                                                                                                                                                                                                        |
| `image_urls`             | string or array of string   | No       | -       | Image(s) for photo posts: a single URL, a list of URLs, or one string with URLs separated by commas or new lines. 1 to 10 images (photo stories accept exactly one). Accepts direct image URLs or Google Drive share links with sharing set to 'Anyone with the link'. URLs must be publicly reachable since Facebook downloads them server side. |
| `video_url`              | string                      | No       | -       | Video for video, reel, and video story posts. Accepts a direct video URL or a Google Drive share link with sharing set to 'Anyone with the link'. Must be publicly reachable. Reels must be vertical 9:16, at least 540x960, roughly 3 to 90 seconds; video stories are the same but up to roughly 60 seconds.                                    |
| `video_title`            | string                      | No       | -       | Optional title for video posts. Not used for reels.                                                                                                                                                                                                                                                                                               |
| `publish_mode`           | string or SelectableOption  | No       | `now`   | Choose 'now' to publish immediately (default) or 'scheduled' to schedule for later.                                                                                                                                                                                                                                                               |
| `scheduled_publish_time` | string or integer or number | No       | -       | When to publish, required when publish\_mode is 'scheduled'. Accepts a unix timestamp in seconds, 'YYYY-MM-DD HH:MM' interpreted as UTC, or ISO 8601 with a timezone offset. Must be at least 10 minutes in the future.                                                                                                                           |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns the created post details. Videos and reels are processed by Facebook in the background, so the post can take a few minutes to appear.

**Fields**: `post_id`, `post_url`, `page_id`, `page_name`, `post_type`, `status`

**Example**:

```json theme={"dark"}
{
  "post_id": "1234567890_9876543210",
  "post_url": "https://www.facebook.com/1234567890_9876543210",
  "page_id": "1234567890",
  "page_name": "My Page",
  "post_type": "photo",
  "status": "published"
}
```
