File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libraries/nestjs-libraries/src/integrations/social Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -254,10 +254,11 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
254254 }
255255
256256 const postsArray = [ ] ;
257- for ( const comment of comments . reverse ( ) ) {
257+ let commentId = finalId ;
258+ for ( const comment of comments ) {
258259 const data = await (
259260 await this . fetch (
260- `https://graph.facebook.com/v20.0/${ finalId } /comments?access_token=${ accessToken } &fields=id,permalink_url` ,
261+ `https://graph.facebook.com/v20.0/${ commentId } /comments?access_token=${ accessToken } &fields=id,permalink_url` ,
261262 {
262263 method : 'POST' ,
263264 headers : {
@@ -274,6 +275,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {
274275 )
275276 ) . json ( ) ;
276277
278+ commentId = data . id ;
277279 postsArray . push ( {
278280 id : comment . id ,
279281 postId : data . id ,
You can’t perform that action at this time.
0 commit comments