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

# facebook

> Facebook Graph API

**Server path:** `/facebook` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                          | Description                     |
| ------------------------------------------------------------- | ------------------------------- |
| [`facebook_create_comment`](#facebook_create_comment)         | Add a comment to a post         |
| [`facebook_create_page_post`](#facebook_create_page_post)     | Create a post on a page         |
| [`facebook_get_me`](#facebook_get_me)                         | Get authenticated user profile  |
| [`facebook_get_page`](#facebook_get_page)                     | Get page information            |
| [`facebook_get_page_insights`](#facebook_get_page_insights)   | Get page insights and analytics |
| [`facebook_list_page_posts`](#facebook_list_page_posts)       | List posts on a page            |
| [`facebook_list_post_comments`](#facebook_list_post_comments) | Get comments on a post          |
| [`facebook_list_user_pages`](#facebook_list_user_pages)       | List pages managed by a user    |

***

## facebook\_create\_comment

Add a comment to a post

**Parameters:**

| Parameter | Type   | Required | Default | Description                      |
| --------- | ------ | -------- | ------- | -------------------------------- |
| `post_id` | string | Yes      | —       | The ID of the post to comment on |
| `message` | string | Yes      | —       | The text content of the comment  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "post_id": {
        "type": "string",
        "description": "The ID of the post to comment on"
      },
      "message": {
        "type": "string",
        "description": "The text content of the comment"
      }
    },
    "required": [
      "PCID",
      "post_id",
      "message"
    ]
  }
  ```
</Expandable>

***

## facebook\_create\_page\_post

Create a post on a page

**Parameters:**

| Parameter                | Type    | Required | Default | Description                                                                                                              |
| ------------------------ | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| `page_id`                | string  | Yes      | —       | The ID of the Facebook Page to post to                                                                                   |
| `link`                   | string  | No       | —       | A URL to share in the post                                                                                               |
| `message`                | string  | No       | —       | The text content of the post                                                                                             |
| `published`              | boolean | No       | —       | Whether the post should be published immediately (default true). Set to false to create an unpublished/draft post.       |
| `scheduled_publish_time` | integer | No       | —       | Unix timestamp for when to publish the post (requires published=false). Must be between 10 minutes and 30 days from now. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "page_id": {
        "type": "string",
        "description": "The ID of the Facebook Page to post to"
      },
      "link": {
        "type": "string",
        "description": "A URL to share in the post"
      },
      "message": {
        "type": "string",
        "description": "The text content of the post"
      },
      "published": {
        "type": "boolean",
        "description": "Whether the post should be published immediately (default true). Set to false to create an unpublished/draft post."
      },
      "scheduled_publish_time": {
        "type": "integer",
        "description": "Unix timestamp for when to publish the post (requires published=false). Must be between 10 minutes and 30 days from now."
      }
    },
    "required": [
      "PCID",
      "page_id"
    ]
  }
  ```
</Expandable>

***

## facebook\_get\_me

Get authenticated user profile

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                           |
| --------- | ------ | -------- | ------- | --------------------------------------------------------------------- |
| `fields`  | string | No       | —       | Comma-separated list of fields to return (e.g. id,name,email,picture) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "fields": {
        "type": "string",
        "description": "Comma-separated list of fields to return (e.g. id,name,email,picture)"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## facebook\_get\_page

Get page information

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                                                        |
| --------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------- |
| `page_id` | string | Yes      | —       | The ID of the Facebook Page                                                                        |
| `fields`  | string | No       | —       | Comma-separated list of fields to return (e.g. name,category,fan\_count,about,description,website) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "page_id": {
        "type": "string",
        "description": "The ID of the Facebook Page"
      },
      "fields": {
        "type": "string",
        "description": "Comma-separated list of fields to return (e.g. name,category,fan_count,about,description,website)"
      }
    },
    "required": [
      "PCID",
      "page_id"
    ]
  }
  ```
</Expandable>

***

## facebook\_get\_page\_insights

Get page insights and analytics

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                                                                                                     |
| --------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `page_id` | string | Yes      | —       | The ID of the Facebook Page                                                                                                                     |
| `metric`  | string | Yes      | —       | Comma-separated list of metrics to retrieve (e.g. page\_impressions,page\_engaged\_users,page\_fans,page\_views\_total,page\_post\_engagements) |
| `period`  | string | No       | —       | Aggregation period: day, week, days\_28, month, lifetime, total\_over\_range                                                                    |
| `since`   | string | No       | —       | Unix timestamp or date string for the start of the date range                                                                                   |
| `until`   | string | No       | —       | Unix timestamp or date string for the end of the date range                                                                                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "page_id": {
        "type": "string",
        "description": "The ID of the Facebook Page"
      },
      "metric": {
        "type": "string",
        "description": "Comma-separated list of metrics to retrieve (e.g. page_impressions,page_engaged_users,page_fans,page_views_total,page_post_engagements)"
      },
      "period": {
        "type": "string",
        "description": "Aggregation period: day, week, days_28, month, lifetime, total_over_range",
        "enum": [
          "day",
          "week",
          "days_28",
          "month",
          "lifetime",
          "total_over_range"
        ]
      },
      "since": {
        "type": "string",
        "description": "Unix timestamp or date string for the start of the date range"
      },
      "until": {
        "type": "string",
        "description": "Unix timestamp or date string for the end of the date range"
      }
    },
    "required": [
      "PCID",
      "page_id",
      "metric"
    ]
  }
  ```
</Expandable>

***

## facebook\_list\_page\_posts

List posts on a page

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                                                        |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `page_id` | string  | Yes      | —       | The ID of the Facebook Page                                                                                        |
| `fields`  | string  | No       | —       | Comma-separated list of fields to return (e.g. id,message,created\_time,permalink\_url,shares,likes.summary(true)) |
| `limit`   | integer | No       | —       | Maximum number of posts to return (default 25, max 100)                                                            |
| `after`   | string  | No       | —       | Cursor for pagination (from previous response's paging.cursors.after)                                              |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "page_id": {
        "type": "string",
        "description": "The ID of the Facebook Page"
      },
      "fields": {
        "type": "string",
        "description": "Comma-separated list of fields to return (e.g. id,message,created_time,permalink_url,shares,likes.summary(true))"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of posts to return (default 25, max 100)"
      },
      "after": {
        "type": "string",
        "description": "Cursor for pagination (from previous response's paging.cursors.after)"
      }
    },
    "required": [
      "PCID",
      "page_id"
    ]
  }
  ```
</Expandable>

***

## facebook\_list\_post\_comments

Get comments on a post

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                               |
| --------- | ------- | -------- | ------- | ----------------------------------------------------------------------------------------- |
| `post_id` | string  | Yes      | —       | The ID of the post                                                                        |
| `fields`  | string  | No       | —       | Comma-separated list of fields to return (e.g. id,message,from,created\_time,like\_count) |
| `limit`   | integer | No       | —       | Maximum number of comments to return                                                      |
| `after`   | string  | No       | —       | Cursor for pagination (from previous response's paging.cursors.after)                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "post_id": {
        "type": "string",
        "description": "The ID of the post"
      },
      "fields": {
        "type": "string",
        "description": "Comma-separated list of fields to return (e.g. id,message,from,created_time,like_count)"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of comments to return"
      },
      "after": {
        "type": "string",
        "description": "Cursor for pagination (from previous response's paging.cursors.after)"
      }
    },
    "required": [
      "PCID",
      "post_id"
    ]
  }
  ```
</Expandable>

***

## facebook\_list\_user\_pages

List pages managed by a user

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                    |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------ |
| `user_id` | string  | Yes      | —       | The user ID, or 'me' for the authenticated user                                |
| `fields`  | string  | No       | —       | Comma-separated list of fields to return (e.g. name,access\_token,category,id) |
| `limit`   | integer | No       | —       | Maximum number of pages to return                                              |
| `after`   | string  | No       | —       | Cursor for pagination (from previous response's paging.cursors.after)          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "user_id": {
        "type": "string",
        "description": "The user ID, or 'me' for the authenticated user"
      },
      "fields": {
        "type": "string",
        "description": "Comma-separated list of fields to return (e.g. name,access_token,category,id)"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of pages to return"
      },
      "after": {
        "type": "string",
        "description": "Cursor for pagination (from previous response's paging.cursors.after)"
      }
    },
    "required": [
      "PCID",
      "user_id"
    ]
  }
  ```
</Expandable>
