mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Enable sending multiple photos as individual stories on Facebook
Update FacebookService to publish each media item in mediaList as a separate story, returning a comma-separated string of story IDs. 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/mIWJXC9
This commit is contained in:
1 parent
5c54f2abb1
commit
5c591899a1
1 file changed
+11
-2
@@ -38,11 +38,20 @@ export class FacebookService {
|
||||
}
|
||||
|
||||
if (postType === 'story') {
|
||||
// Publish as story only
|
||||
// Publish as story - one story per media
|
||||
if (mediaList.length === 0) {
|
||||
throw new Error('Stories require media (photo or video)');
|
||||
}
|
||||
return await this.publishStory(post, page, mediaList[0]);
|
||||
|
||||
// Publish each media as a separate story
|
||||
const storyIds: string[] = [];
|
||||
for (const media of mediaList) {
|
||||
const storyId = await this.publishStory(post, page, media);
|
||||
storyIds.push(storyId);
|
||||
}
|
||||
|
||||
// Return all story IDs joined together
|
||||
return storyIds.join(',');
|
||||
} else {
|
||||
// Default to feed
|
||||
// Count images only (videos not supported in multi-photo carousel)
|
||||
|
||||
Reference in new issue
Block a user