mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Enable scheduling and posting to Facebook and Instagram pages
Fix bug in post creation to correctly handle media, page selection, and scheduling for social media posts. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/sjuGm8z
This commit is contained in:
1 parent
f07f897ce0
commit
e5123fbb27
3 files changed
+45
-3
No files matched your search
@@ -106,9 +106,21 @@ export default function NewPost() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedPages.length === 0) {
|
||||
toast({
|
||||
title: "Page requise",
|
||||
description: "Veuillez sélectionner au moins une page",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
createPostMutation.mutate({
|
||||
content: postText,
|
||||
scheduledFor: scheduledDate || undefined,
|
||||
mediaId: selectedMedia || undefined,
|
||||
pageIds: selectedPages,
|
||||
postType: 'feed', // Default to feed post
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user