Facebook OAuth fails: hardcoded `read_insights` scope is deprecated by Meta
Description
When connecting a Facebook Page or Instagram account via Postiz integrations, the OAuth flow fails with:
Invalid Scopes: read_insights. This message is only shown to developers.
The OAuth URL generated by Postiz includes read_insights in the scope parameter:
scope=pages_show_list,business_management,pages_manage_posts,pages_manage_engagement,pages_read_engagement,read_insights Meta deprecated read_insights and it is no longer a valid standalone permission. Any app in Live mode that requests this scope gets blocked at the OAuth dialog. The functionality previously covered by read_insights is now handled by pages_read_engagement and the Insights API — both of which Postiz already requests.
Reproduction steps
- Deploy Postiz (self-hosted)
- Go to Integrations → connect Facebook Page
- Get redirected to Facebook OAuth
- OAuth fails with "Invalid Scopes: read_insights"
Expected behavior
Facebook OAuth completes successfully. read_insights should be removed from the hardcoded scope list since it is deprecated and its replacement scopes are already present.
Actual Behavior with Screenshots
The OAuth dialog shows: "Invalid Scopes: read_insights. This message is only shown to developers." and the connection fails. Facebook blocks the OAuth flow entirely when the app is in Live mode.
Operating system
Linux
Node Version
As bundled in ghcr.io/gitroomhq/postiz-app:latest
Provide any additional context for the Bug.
No response
Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None
Source: gitroomhq/postiz-app