π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: fix facebook analytics
Nevo Davide1bfcc24ed61
diff --git a/.nx/workspace-data/d/daemon.log b/.nx/workspace-data/d/daemon.logindex 4bd1111aa..b42e50594 100644--- a/.nx/workspace-data/d/daemon.log+++ b/.nx/workspace-data/d/daemon.log@@ -295,3 +295,64 @@[NX Daemon Server] - 2024-09-11T12:08:03.155Z - Done responding to the client handleGetFlakyTasks[NX Daemon Server] - 2024-09-11T12:08:03.155Z - Handled GET_TASK_HISTORY_FOR_HASHES. Handling time: 0. Response time: 0.[NX Daemon Server] - 2024-09-11T12:08:03.158Z - Closed a connection. Number of open connections: 2+[NX Daemon Server] - 2024-09-11T12:11:09.531Z - [WATCHER]: apps/frontend/tsconfig.spec.json was modified+[NX Daemon Server] - 2024-09-11T12:11:09.532Z - [REQUEST]: Responding to the client. File watch changed+[NX Daemon Server] - 2024-09-11T12:11:09.532Z - Done responding to the client File watch changed+[NX Daemon Server] - 2024-09-11T12:11:09.532Z - Handled FILE-WATCH-CHANGED. Handling time: 0. Response time: 0.+[NX Daemon Server] - 2024-09-11T12:11:09.532Z - [WATCHER]: Processing file changes in outputs+[NX Daemon Server] - 2024-09-11T12:11:09.532Z - Time taken for 'changed-projects' 0.1993749737739563ms+[NX Daemon Server] - 2024-09-11T12:11:09.634Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...+[NX Daemon Server] - 2024-09-11T12:11:09.634Z - [REQUEST]: apps/frontend/tsconfig.spec.json+[NX Daemon Server] - 2024-09-11T12:11:09.634Z - [REQUEST]:+[NX Daemon Server] - 2024-09-11T12:11:09.636Z - Time taken for 'hash changed files from watcher' 0.46366703510284424ms+[NX Daemon Server] - 2024-09-11T12:11:09.669Z - Time taken for 'build-project-configs' 30.41016697883606ms+[NX Daemon Server] - 2024-09-11T12:11:09.704Z - [SYNC]: collect registered sync generators+[NX Daemon Server] - 2024-09-11T12:11:09.705Z - [SYNC]: project graph hash is the same, not collecting task sync generators+[NX Daemon Server] - 2024-09-11T12:11:09.705Z - [SYNC]: nx.json hash is the same, not collecting global sync generators+[NX Daemon Server] - 2024-09-11T12:11:09.705Z - Time taken for 'total execution time for createProjectGraph()' 29.549499988555908ms+[NX Daemon Server] - 2024-09-11T12:11:10.039Z - [REQUEST]: Client Request for Project Graph Received+[NX Daemon Server] - 2024-09-11T12:11:10.039Z - [REQUEST]: Responding to the client. project-graph+[NX Daemon Server] - 2024-09-11T12:11:10.040Z - Time taken for 'total for creating and serializing project graph' 0.4152500033378601ms+[NX Daemon Server] - 2024-09-11T12:11:10.049Z - Done responding to the client project-graph+[NX Daemon Server] - 2024-09-11T12:11:10.049Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 0. Response time: 10.+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - [WATCHER]: apps/frontend/tsconfig.spec.json was modified+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - [REQUEST]: Responding to the client. File watch changed+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - Done responding to the client File watch changed+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - Handled FILE-WATCH-CHANGED. Handling time: 0. Response time: 0.+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - [WATCHER]: Processing file changes in outputs+[NX Daemon Server] - 2024-09-11T12:11:17.622Z - Time taken for 'changed-projects' 0.09654098749160767ms+[NX Daemon Server] - 2024-09-11T12:11:17.723Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...+[NX Daemon Server] - 2024-09-11T12:11:17.723Z - [REQUEST]: apps/frontend/tsconfig.spec.json+[NX Daemon Server] - 2024-09-11T12:11:17.723Z - [REQUEST]:+[NX Daemon Server] - 2024-09-11T12:11:17.726Z - Time taken for 'hash changed files from watcher' 0.769582986831665ms+[NX Daemon Server] - 2024-09-11T12:11:17.750Z - Time taken for 'build-project-configs' 20.56195902824402ms+[NX Daemon Server] - 2024-09-11T12:11:17.788Z - [SYNC]: collect registered sync generators+[NX Daemon Server] - 2024-09-11T12:11:17.788Z - [SYNC]: project graph hash is the same, not collecting task sync generators+[NX Daemon Server] - 2024-09-11T12:11:17.788Z - [SYNC]: nx.json hash is the same, not collecting global sync generators+[NX Daemon Server] - 2024-09-11T12:11:17.788Z - Time taken for 'total execution time for createProjectGraph()' 33.41712498664856ms+[NX Daemon Server] - 2024-09-11T12:11:18.126Z - [REQUEST]: Client Request for Project Graph Received+[NX Daemon Server] - 2024-09-11T12:11:18.127Z - [REQUEST]: Responding to the client. project-graph+[NX Daemon Server] - 2024-09-11T12:11:18.128Z - Time taken for 'total for creating and serializing project graph' 1.5637909770011902ms+[NX Daemon Server] - 2024-09-11T12:11:18.134Z - Done responding to the client project-graph+[NX Daemon Server] - 2024-09-11T12:11:18.134Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 1. Response time: 7.+[NX Daemon Server] - 2024-09-11T12:15:59.858Z - [WATCHER]: libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts was modified+[NX Daemon Server] - 2024-09-11T12:15:59.859Z - [REQUEST]: Responding to the client. File watch changed+[NX Daemon Server] - 2024-09-11T12:15:59.859Z - Done responding to the client File watch changed+[NX Daemon Server] - 2024-09-11T12:15:59.859Z - Handled FILE-WATCH-CHANGED. Handling time: 0. Response time: 0.+[NX Daemon Server] - 2024-09-11T12:15:59.859Z - [WATCHER]: Processing file changes in outputs+[NX Daemon Server] - 2024-09-11T12:15:59.859Z - Time taken for 'changed-projects' 0.19462502002716064ms+[NX Daemon Server] - 2024-09-11T12:15:59.968Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...+[NX Daemon Server] - 2024-09-11T12:15:59.968Z - [REQUEST]: libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts+[NX Daemon Server] - 2024-09-11T12:15:59.968Z - [REQUEST]:+[NX Daemon Server] - 2024-09-11T12:15:59.978Z - Time taken for 'hash changed files from watcher' 1.1890829801559448ms+[NX Daemon Server] - 2024-09-11T12:16:00.035Z - Time taken for 'build-project-configs' 53.51687502861023ms+[NX Daemon Server] - 2024-09-11T12:16:00.070Z - [SYNC]: collect registered sync generators+[NX Daemon Server] - 2024-09-11T12:16:00.071Z - [SYNC]: project graph hash is the same, not collecting task sync generators+[NX Daemon Server] - 2024-09-11T12:16:00.071Z - [SYNC]: nx.json hash is the same, not collecting global sync generators+[NX Daemon Server] - 2024-09-11T12:16:00.072Z - Time taken for 'total execution time for createProjectGraph()' 29.680292010307312ms+[NX Daemon Server] - 2024-09-11T12:16:00.362Z - [REQUEST]: Client Request for Project Graph Received+[NX Daemon Server] - 2024-09-11T12:16:00.363Z - [REQUEST]: Responding to the client. project-graph+[NX Daemon Server] - 2024-09-11T12:16:00.363Z - Time taken for 'total for creating and serializing project graph' 0.242792010307312ms+[NX Daemon Server] - 2024-09-11T12:16:00.369Z - Done responding to the client project-graph+[NX Daemon Server] - 2024-09-11T12:16:00.369Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 1. Response time: 6.+[NX Daemon Server] - 2024-09-11T12:16:02.146Z - [WATCHER]: Processing file changes in outputsdiff --git a/.nx/workspace-data/file-map.json b/.nx/workspace-data/file-map.jsonindex 5cba75715..486c9330d 100644--- a/.nx/workspace-data/file-map.json+++ b/.nx/workspace-data/file-map.json@@ -204,228 +204,228 @@"fileMap": {"nonProjectFiles": [{- "file": ".devcontainer/devcontainer.json",- "hash": "14351274284383957364"+ "file": "var/docker/supervisord.conf",+ "hash": "11075105168503179453"},{- "file": ".dockerignore",- "hash": "15111313885890417682"+ "file": ".github/workflows/build.yaml",+ "hash": "7391629024683681252"},{- "file": ".env.example",- "hash": "12708730687857812667"+ "file": "var/docker/docker-build.sh",+ "hash": "14026090172416867330"},{- "file": ".eslintignore",- "hash": "7663861978715868291"+ "file": ".github/workflows/codeql.yml",+ "hash": "14335231655185804782"},{- "file": ".eslintrc.json",- "hash": "4103543200215464923"+ "file": ".github/workflows/build-containers.yml",+ "hash": "12125288151486098864"},{- "file": ".github/ISSUE_TEMPLATE/bug_report.yml",- "hash": "5825134754294952518"+ "file": "libraries/helpers/src/utils/custom.fetch.func.ts",+ "hash": "3873920074194237778"},{- "file": ".github/ISSUE_TEMPLATE/feature_request.yml",- "hash": "11833240586361254286"+ "file": ".dockerignore",+ "hash": "15111313885890417682"},{- "file": ".github/PULL_REQUEST_TEMPLATE.md",- "hash": "16615718099920987337"+ "file": "libraries/helpers/src/swagger/load.swagger.ts",+ "hash": "5609629468062019515"},{- "file": ".github/assets/gitroom-darkmode-logo.png",- "hash": "18333385985712224872"+ "file": "var/docker/docker-create.sh",+ "hash": "2978359363426959461"},{- "file": ".github/assets/gitroom-lightmode-logo.png",- "hash": "7984896463819400098"+ "file": "var/docker/supervisord/cron.conf",+ "hash": "9523241048078889399"},{- "file": ".github/assets/gitroom-main-youtube.png",- "hash": "1336079232766965088"+ "file": ".gitignore",+ "hash": "996027888444059694"},{- "file": ".github/assets/screen-002.png",- "hash": "12305026372091775026"+ "file": "libraries/helpers/src/utils/linkedin.company.prevent.remove.ts",+ "hash": "1375821839012190189"},{- "file": ".github/assets/screen-003.png",- "hash": "13880033135844191755"+ "file": "README.md",+ "hash": "16225110991187405771"},{- "file": ".github/assets/screen-004.png",- "hash": "3027781719589404088"+ "file": "var/docker/supervisord/workers.conf",+ "hash": "425809648337353880"},{- "file": ".github/workflows/build-containers.yml",- "hash": "12125288151486098864"+ "file": ".github/PULL_REQUEST_TEMPLATE.md",+ "hash": "16615718099920987337"},{- "file": ".github/workflows/build.yaml",- "hash": "7391629024683681252"+ "file": ".github/assets/screen-002.png",+ "hash": "12305026372091775026"},{- "file": ".github/workflows/codeql.yml",- "hash": "14335231655185804782"+ "file": "libraries/helpers/src/auth/auth.service.ts",+ "hash": "12602717388129413985"},{- "file": ".github/workflows/eslint.yaml",- "hash": "12126455791600149418"+ "file": "Dockerfile.dev",+ "hash": "1461686069827246996"},{- "file": ".gitignore",- "hash": "996027888444059694"+ "file": "package.json",+ "hash": "12551514048688322467"},{- "file": ".prettierignore",- "hash": "16448050467312557263"+ "file": "libraries/helpers/src/utils/remove.markdown.ts",+ "hash": "4329333594222972794"},{- "file": ".prettierrc",- "hash": "16267754514737964994"+ "file": ".github/ISSUE_TEMPLATE/bug_report.yml",+ "hash": "5825134754294952518"},{- "file": ".vscode/extensions.json",- "hash": "4637156562308165301"+ "file": "jest.preset.js",+ "hash": "9430166341120122740"},{- "file": "CODE_OF_CONDUCT.md",- "hash": "11449244652848408044"+ "file": "libraries/helpers/src/utils/is.dev.ts",+ "hash": "5879249797514921209"},{- "file": "Dockerfile.dev",- "hash": "1461686069827246996"+ "file": "var/docker/supervisord/backend.conf",+ "hash": "4847164419739612815"},{"file": "LICENSE","hash": "12033914949973546246"},{- "file": "README.md",- "hash": "16225110991187405771"+ "file": ".vscode/extensions.json",+ "hash": "4637156562308165301"},{- "file": "docker-compose.dev.yaml",- "hash": "3039514600196570035"+ "file": "CODE_OF_CONDUCT.md",+ "hash": "11449244652848408044"},{- "file": "jest.config.ts",- "hash": "12333515226966617182"+ "file": "var/docker/entrypoint.sh",+ "hash": "6985804703639296926"},{- "file": "jest.preset.js",- "hash": "9430166341120122740"+ "file": "libraries/helpers/src/subdomain/all.two.level.subdomain.ts",+ "hash": "11299782291300004955"},{- "file": "libraries/helpers/src/auth/auth.service.ts",- "hash": "12602717388129413985"+ "file": ".devcontainer/devcontainer.json",+ "hash": "14351274284383957364"},{- "file": "libraries/helpers/src/subdomain/all.two.level.subdomain.ts",- "hash": "11299782291300004955"+ "file": ".prettierignore",+ "hash": "16448050467312557263"},{- "file": "libraries/helpers/src/subdomain/subdomain.management.ts",- "hash": "4273482749269434135"+ "file": "nx.json",+ "hash": "13143397806290733681"},{- "file": "libraries/helpers/src/swagger/load.swagger.ts",- "hash": "5609629468062019515"+ "file": "var/docker/supervisord/frontend.conf",+ "hash": "12398553695749500531"},{- "file": "libraries/helpers/src/utils/custom.fetch.func.ts",- "hash": "3873920074194237778"+ "file": "libraries/helpers/src/utils/use.fire.events.ts",+ "hash": "13071186497111846221"},{- "file": "libraries/helpers/src/utils/custom.fetch.tsx",- "hash": "17955849608184954758"+ "file": ".github/workflows/eslint.yaml",+ "hash": "12126455791600149418"+ },+ {+ "file": ".github/ISSUE_TEMPLATE/feature_request.yml",+ "hash": "11833240586361254286"},{"file": "libraries/helpers/src/utils/internal.fetch.ts","hash": "13025859423480541663"},{- "file": "libraries/helpers/src/utils/is.dev.ts",- "hash": "5879249797514921209"+ "file": ".prettierrc",+ "hash": "16267754514737964994"},{- "file": "libraries/helpers/src/utils/linkedin.company.prevent.remove.ts",- "hash": "1375821839012190189"+ "file": ".github/assets/screen-004.png",+ "hash": "3027781719589404088"},{- "file": "libraries/helpers/src/utils/read.or.fetch.ts",- "hash": "1544894843635825100"+ "file": "package-lock.json",+ "hash": "6976120903186393421"},{- "file": "libraries/helpers/src/utils/remove.markdown.ts",- "hash": "4329333594222972794"+ "file": ".github/assets/gitroom-lightmode-logo.png",+ "hash": "7984896463819400098"},{"file": "libraries/helpers/src/utils/timer.ts","hash": "2689293240374064534"},{- "file": "libraries/helpers/src/utils/use.fire.events.ts",- "hash": "13071186497111846221"- },- {- "file": "libraries/helpers/src/utils/utm.saver.tsx",- "hash": "10273568092707519565"+ "file": "tsconfig.base.json",+ "hash": "12082231963935194608"},{- "file": "migrations.json",- "hash": "8771718763912657492"+ "file": ".github/assets/gitroom-darkmode-logo.png",+ "hash": "18333385985712224872"},{- "file": "nx.json",- "hash": "13143397806290733681"+ "file": "libraries/helpers/src/subdomain/subdomain.management.ts",+ "hash": "4273482749269434135"},{- "file": "package-lock.json",- "hash": "6976120903186393421"+ "file": "jest.config.ts",+ "hash": "12333515226966617182"},{- "file": "package.json",- "hash": "12551514048688322467"+ "file": "libraries/helpers/src/utils/custom.fetch.tsx",+ "hash": "17955849608184954758"},{- "file": "tsconfig.base.json",- "hash": "12082231963935194608"+ "file": "docker-compose.dev.yaml",+ "hash": "3039514600196570035"},{- "file": "var/docker/docker-build.sh",- "hash": "14026090172416867330"+ "file": "libraries/helpers/src/utils/utm.saver.tsx",+ "hash": "10273568092707519565"},{- "file": "var/docker/docker-create.sh",- "hash": "2978359363426959461"+ "file": ".eslintignore",+ "hash": "7663861978715868291"},{- "file": "var/docker/entrypoint.sh",- "hash": "6985804703639296926"+ "file": ".github/assets/gitroom-main-youtube.png",+ "hash": "1336079232766965088"},{- "file": "var/docker/supervisord.conf",- "hash": "11075105168503179453"+ "file": ".github/assets/screen-003.png",+ "hash": "13880033135844191755"},{- "file": "var/docker/supervisord/backend.conf",- "hash": "4847164419739612815"+ "file": ".eslintrc.json",+ "hash": "4103543200215464923"},{- "file": "var/docker/supervisord/cron.conf",- "hash": "9523241048078889399"+ "file": ".env.example",+ "hash": "12708730687857812667"},{- "file": "var/docker/supervisord/frontend.conf",- "hash": "12398553695749500531"+ "file": "migrations.json",+ "hash": "8771718763912657492"},{- "file": "var/docker/supervisord/workers.conf",- "hash": "425809648337353880"+ "file": "libraries/helpers/src/utils/read.or.fetch.ts",+ "hash": "1544894843635825100"}],"projectFileMap": {@@ -1882,7 +1882,7 @@},{"file": "libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts",- "hash": "9329002453852481007"+ "hash": "1908519058987315283"},{"file": "libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts",diff --git a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.tsindex d22d56217..7332848aa 100644--- a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts@@ -290,7 +290,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {const since = dayjs().subtract(date, 'day').format('YYYY-MM-DD');const { data } = await (- await fetch(+ await this.fetch(`https://graph.facebook.com/v20.0/${id}/insights?metric=page_impressions_unique,page_posts_impressions_unique,page_post_engagements,page_daily_follows,page_video_views&access_token=${accessToken}&period=day&since=${since}&until=${until}`)).json();