Closed imperialleisure closed 2 years ago
Well noted. Thank you for opening this issue ! We'll try to take a look at this in the upcoming weeks.
My app is in development mode but I am also facing the same problem.
@imperialleisure Facebook returns this error message in one of its headers when getPageId fails : OAuth "Facebook Platform" "invalid_request" "(#100) Object does not exist, cannot be loaded due to missing permission or reviewable feature, or does not support this operation. This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature or the 'Page Public Metadata Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages, https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS and https://developers.facebook.com/docs/apps/review/feature#page-public-metadata-access for details.
All three of the proposed solutions mentioned in the error require that an app passes facebook's app review process. An app probably doesn't work at all in live mode until it's reviewed. Are you sure you passed this review before putting your app in live mode?
@refat2090 You need to set the accessToken in your messenger configuration before starting botpress.
@imperialleisure Facebook returns this error message in one of its headers when getPageId fails :
OAuth "Facebook Platform" "invalid_request" "(#100) Object does not exist, cannot be loaded due to missing permission or reviewable feature, or does not support this operation. This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature or the 'Page Public Metadata Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages, https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS and https://developers.facebook.com/docs/apps/review/feature#page-public-metadata-access for details.
All three of the proposed solutions mentioned in the error require that an app passes facebook's app review process. An app probably doesn't work at all in live mode until it's reviewed. Are you sure you passed this review before putting your app in live mode?
Thank you for your note. The app has passed the review process and has "Approved: pages_messaging". But sounds like I also need to get Page Public Metadata Access permission. Will try. Thanks.
@imperialleisure There's actually a workaround that I thought about. Fetching the pageId is only something we do to support legacy channel-messenger configurations. With new configurations it doesn't need to be fetched at all. So the messenger channel should work correctly with live apps that don't have permissions in the next botpress release. You can see the fix here : https://github.com/botpress/messaging/pull/227
Thanks for adding that fix! I'm running off of a docker-compose so I might have to change tack and build locally instead.
If I restart the botpress server while the Facebook App it is connected to is in Live Mode, Messenger stops receiving messages from the bot but it is still successfully sending messages to the bot.
I see the following error messages repeated in the logs
If I put the Facebook app into Development Mode, I see the following success message
Turning the Facebook App back into Live Mode no longer shows the error message and Messenger starts working again.
I am running botpress on Ubuntu 18 through docker-compose: docker-compose-community-nginx-https.yaml.