From e37c844b9bf347b50e52c528ce0dff2a87724e67 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 13 Oct 2025 12:54:49 +0000 Subject: [PATCH] Fix issues with publishing posts to Facebook and Instagram Address Facebook API errors related to invalid parameters and deprecated permissions by updating the publishing logic in `FacebookService`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/F3F3s9V --- ...-js-70-44--1760360032411_1760360032411.txt | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 attached_assets/Pasted--at-async-Timeout-onTimeout-app-node-modules-node-cron-dist-esm-scheduler-runner-js-70-44--1760360032411_1760360032411.txt diff --git a/attached_assets/Pasted--at-async-Timeout-onTimeout-app-node-modules-node-cron-dist-esm-scheduler-runner-js-70-44--1760360032411_1760360032411.txt b/attached_assets/Pasted--at-async-Timeout-onTimeout-app-node-modules-node-cron-dist-esm-scheduler-runner-js-70-44--1760360032411_1760360032411.txt new file mode 100644 index 0000000..87bf8a4 --- /dev/null +++ b/attached_assets/Pasted--at-async-Timeout-onTimeout-app-node-modules-node-cron-dist-esm-scheduler-runner-js-70-44--1760360032411_1760360032411.txt @@ -0,0 +1,72 @@ + at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44) + +Publishing post 6439b99f-d5eb-4774-b7ea-97c9be8bb3bf to facebook page Frouard + +Publishing non-image media to Facebook feed - this may fail + +Error publishing post aea0ba94-8e1a-4923-9942-6940029f6be5: Error: Facebook API error: Invalid parameter (code: 100) + + at FacebookService.publishPhotoPost (file:///app/dist/index.js:2029:13) + + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + + at async FacebookService.publishPost (file:///app/dist/index.js:1994:16) + + at async SchedulerService.publishPost (file:///app/dist/index.js:2249:24) + + at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2211:11) + + at async file:///app/dist/index.js:2187:7 + + at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44) + +12:52:05 PM [express] GET /api/stats 304 in 29ms :: {"scheduledPosts":9,"scheduledPostsChange":"+100%… + +12:52:05 PM [express] GET /api/scheduled-posts 200 in 33ms :: [{"id":"9128ce3e-88b5-4afe-9834-e79e2da… + +12:52:06 PM [express] GET /api/media 304 in 11ms :: [{"id":"d501254d-4892-4d63-8900-e790ab3794e8","us… + +Publishing post 6439b99f-d5eb-4774-b7ea-97c9be8bb3bf to facebook page Houdemont + +Publishing non-image media to Facebook feed - this may fail + +Error publishing post 23173c8a-7843-48e7-876f-3353988b82a0: Error: Facebook API error: (#200) The permission(s) publish_actions are not available. It has been deprecated. If you want to provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead. (code: 200) + + at FacebookService.publishPhotoPost (file:///app/dist/index.js:2029:13) + + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + + at async FacebookService.publishPost (file:///app/dist/index.js:1994:16) + + at async SchedulerService.publishPost (file:///app/dist/index.js:2249:24) + + at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2211:11) + + at async file:///app/dist/index.js:2187:7 + + at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44) + +Publishing post 6439b99f-d5eb-4774-b7ea-97c9be8bb3bf to facebook page Frouard + +Publishing non-image media to Facebook feed - this may fail + +Error publishing post aea0ba94-8e1a-4923-9942-6940029f6be5: Error: Facebook API error: Invalid parameter (code: 100) + + at FacebookService.publishPhotoPost (file:///app/dist/index.js:2029:13) + + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + + at async FacebookService.publishPost (file:///app/dist/index.js:1994:16) + + at async SchedulerService.publishPost (file:///app/dist/index.js:2249:24) + + at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2211:11) + + at async file:///app/dist/index.js:2187:7 + + at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44) + + + + + \ No newline at end of file