KosmoKrator

social

Facebook CLI for Coding Agents

Use the Facebook CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write Bearer token auth

Facebook CLI for Coding Agents

Let coding agents discover schemas and execute integration functions through CLI commands or MCP.

Use this pattern when another coding agent needs exact commands and schema discovery. The Facebook CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Facebook CLI for Coding Agents
kosmokrator integrations:configure facebook --set access_token="$FACEBOOK_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call facebook.facebook_list_pages '{"fields":"example_fields","limit":1}' --json

Discovery Before Execution

Agents and scripts can inspect Facebook docs and schemas before choosing a function.

kosmo integrations:docs facebook --json
kosmo integrations:docs facebook.facebook_list_pages --json
kosmo integrations:schema facebook.facebook_list_pages --json
kosmo integrations:search "Facebook" --json
kosmo integrations:list --json

Useful Facebook CLI Functions

FunctionTypeParametersDescription
facebook.facebook_list_pages Read fields, limit List all Facebook Pages the authenticated user manages. Returns page IDs, names, and access tokens for further operations.
facebook.facebook_get_page Read page_id, fields Get details for a specific Facebook Page by its ID. Returns page name, category, follower count, and other metadata.
facebook.facebook_list_posts Read page_id, fields, limit, since, until List posts published by a Facebook Page. Returns post IDs, messages, creation times, and engagement metrics.
facebook.facebook_create_post Write page_id, message, link, scheduled_publish_time Publish a new post on a Facebook Page. The post will appear on the Page's timeline immediately unless scheduled.
facebook.facebook_get_post Read post_id, fields Get details for a specific Facebook post by its ID. Returns the post content, creation time, and engagement metrics.
facebook.facebook_list_insights Read page_id, metric, period, since, until Get engagement and performance metrics (insights) for a Facebook Page. Supports metrics like page_impressions, page_engaged_users, page_post_engagements, and more.
facebook.facebook_get_current_user Read fields Get the authenticated user's Facebook profile information, including name and user ID.

Automation Notes

Related Facebook CLI Pages