# Facebook Pages — Pipedream Connect

> Social media and social networking service.

- API slug: `facebook_pages` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Marketing
- Website: https://facebook.com
- Managed OAuth scopes: `email` · `public_profile` · `pages_manage_engagement` · `pages_manage_posts` · `pages_show_list` · `pages_read_user_content` · `pages_read_engagement` · `business_management`
- This page (HTML): https://pipedream.com/apps/facebook-pages
- Tools: 9 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: facebook_pages`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "facebook_pages",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Comment:
const result = await mcp.callTool({
  name: "facebook_pages-create-comment",
  arguments: {
    page: "Page",
    post: "Post",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Facebook Pages endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://graph.facebook.com/v25.0/me/

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9ncmFwaC5mYWNlYm9vay5jb20vdjI1LjAvbWUv?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "facebook_pages-create-comment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    facebook_pages: { authProvisionId: "apn_xxxxxxx" },
    page: "Page",
    post: "Post",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (9)

### `facebook_pages-create-comment` — Create Comment (Write)

Create a new comment on a post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/create-comment.md

### `facebook_pages-create-post` — Create Post (Write)

Create a new post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/create-post.md

### `facebook_pages-get-comment` — Get Comment (Read-only)

Retrieves a comment on a post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/get-comment.md

### `facebook_pages-get-page` — Get Page (Read-only)

Retrieves a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/get-page.md

### `facebook_pages-get-post` — Get Post (Read-only)

Retrieves a post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/get-post.md

### `facebook_pages-list-comments` — List Comments (Read-only)

Retrieves a list of comments on a post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/list-comments.md

### `facebook_pages-list-posts` — List Posts (Read-only)

Retrieves a list of posts on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/list-posts.md

### `facebook_pages-update-comment` — Update Comment (Write)

Updates an existing comment on a post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/update-comment.md

### `facebook_pages-update-post` — Update Post (Write)

Update an existing post on a Facebook Page. See the documentation

Full schema: https://pipedream.com/apps/facebook-pages/actions/update-post.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
