social
Facebook CLI for Headless Automation
Use the Facebook CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
Facebook CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. 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 Headless Automation
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
| Function | Type | Parameters | Description |
|---|---|---|---|
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
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.