Skip to content

Facebook Page

CLI examples for Facebook Page publishing in OpenQuok

2 min read

Connect your agent today

Draft from chat, review in your calendar, and publish only what you approve.

Start for $0

Text-only Page post

openquok posts:create 
  -c "Hello from our Page" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>"

With image

At publish time the backend resolves each stored object key to a public https:// URL for Meta to fetch.

test -f ./hero.jpg && test -s ./hero.jpg
IMAGE=$(openquok upload ./hero.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create 
  -c "Photo update" 
  -m "$IMAGE" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>"

Link post

Pass an optional URL in providerSettingsByIntegrationId:

openquok posts:create 
  -c "Read more on our site" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>" 
  --providerSettingsByIntegrationId '{"<facebook-page-integration-id>":{"url":"https://example.com/article"}}'
MEDIA=$(jq -s 'add' 
  <(openquok upload ./a.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]') 
  <(openquok upload ./b.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]'))
openquok posts:create 
  -c "Two photos, one post" 
  -m "$MEDIA" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>"

Story (image or MP4)

Stories require at least one attachment. Set post_type: story on --settings or inside providerSettingsByIntegrationId. Each attachment publishes as its own Story.

test -f ./story.jpg && test -s ./story.jpg
MEDIA=$(openquok upload ./story.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create 
  -c "" 
  -m "$MEDIA" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>" 
  --settings '{"post_type":"story"}'

Nested web-composer bucket (same behavior):

openquok posts:create 
  -c "" 
  -m "$MEDIA" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>" 
  --providerSettingsByIntegrationId '{"<facebook-page-integration-id>":{"facebook":{"postType":"story"}}}'

Scheduled follow-up comments

providerSettings.facebook.replies[] carries follow-up replies that publish as comments on the Page post after a fixed delay. Pass them on posts:create with --providerSettingsByIntegrationId:
openquok posts:create 
  -c "Main post" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>" 
  --providerSettingsByIntegrationId "$(jq -nc --arg id "<facebook-page-integration-id>" '
    {
      ($id): {
        facebook: {
          replies: [
            { message: "First comment on the post", delaySeconds: 60 }
          ]
        }
      }
    }
  ')"

Follow-up with one image

Upload first, then attach at most one image per reply row (no video):

REPLY_MEDIA=$(openquok upload ./comment-image.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')

openquok posts:create 
  -c "Main post" 
  -s "2026-01-01T12:00:00Z" 
  -i "<facebook-page-integration-id>" 
  --providerSettingsByIntegrationId "$(jq -nc 
    --arg id "<facebook-page-integration-id>" 
    --argjson media "$REPLY_MEDIA" '
    {
      ($id): {
        facebook: {
          replies: [
            { message: "See the chart in this comment", delaySeconds: 60, media: $media }
          ]
        }
      }
    }
  ')"

Resolve integration UUID

FB_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="facebook") | .id')
openquok integrations:settings "$FB_ID"
openquok analytics:platform "$FB_ID" -d 30

Platform-specific settings

Configure per integration in the web composer Settings panel, or pass flat keys on the CLI with --settings (merged into providerSettingsByIntegrationId).

SettingCLI / API keyWeb composer (facebook.*)Values
Post typepost_typepostTypepost (feed/Reel) or story
Link preview URLurlurlhttps://… (text-only feed posts)
Follow-up commentsreplies (nested under facebook)replies[{ "message": "…", "delaySeconds": 60 }] (feed posts only)
Search documentation
Find a docs page
Discord Support