Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: comment to comment

Nevo David313380e1833f
diff --git a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts
index 4857009a4..44e1b753b 100644
--- a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts
@@ -254,10 +254,11 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
}
const postsArray = [];
- for (const comment of comments.reverse()) {
+ let commentId = finalId;
+ for (const comment of comments) {
const data = await (
await this.fetch(
- `https://graph.facebook.com/v20.0/${finalId}/comments?access_token=${accessToken}&fields=id,permalink_url`,
+ `https://graph.facebook.com/v20.0/${commentId}/comments?access_token=${accessToken}&fields=id,permalink_url`,
{
method: 'POST',
headers: {
@@ -274,6 +275,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
)
).json();
+ commentId = data.id;
postsArray.push({
id: comment.id,
postId: data.id,