Facebook post
Apply socialkit-social-core. Setup: setup. Sign in first with socialkit-meta-auth.
Steps
- Create the post folder with the socialkit-social-core post script:
node <socialkit-social-core>/scripts/post.mjs --init --dir fb-<slug> --platform facebook --kind <text|link|photo|photos|video> - Write
post.json:text, optionallink,mediaentries ({"source": "photo.jpg", "type": "image", "altText": "..."}; local files are uploaded directly), optionalscheduledAt(10 minutes to 30 days ahead) andoptions.pageIdwhen several Pages are connected. - Validate:
node scripts/publish.mjs --check --dir fb-<slug> - Stop. Show the post. Ask the user to run in their own terminal:
node <socialkit-social-core>/scripts/post.mjs --approve --dir fb-<slug> - Publish:
node scripts/publish.mjs --publish --dir fb-<slug>. Report the post id, URL, Page and schedule.
Failure handling
APPROVAL_REQUIRED: the post changed after approval; ask again.META_PAGE_AMBIGUOUS: setoptions.pageIdto one of the listed Pages.- Code 190: run socialkit-meta-auth again. Code 368: Meta blocked the action; do not retry.
ALREADY_PUBLISHED: this folder was posted; only use--allow-repostif asked.
