删除计划的 Facebook 页面 post 时出现错误:pages_manage_engagement 不可用

I am getting an error when deleting the scheduled Facebook page post: pages_manage_engagement are not available

在我们的 android 应用程序中,我们提供了在 Facebook 页面上安排和发布 post 的功能。我们还提供了删除预定 post.

的功能

对于上述功能,我们已经通过应用审查获得了所需的权限(publish_pages,manage_pages)。

所有功能在我们的 Android 和 iOS 平台上都能完美运行。但在过去的几周里,我们在删除 Android 平台上的时间表 post 时遇到错误。当我们在 Android 平台上检查此功能有什么问题时,我们收到以下错误。

错误:

{Response: responseCode: 403, graphObject: null, error: {HttpStatus: 403, errorCode: 200, subErrorCode: -1, errorType: OAuthException, errorMessage: (#200) The permission(s) pages_manage_engagement are not available. It could because either they are deprecated or need to be approved by App Review.}}

根据上述错误我们查了Facebook平台的文档,上面说“pages_manage_engagement”权限用于“创建,编辑,删除” 评论post由您的主页编辑”。 我们没有提供任何与页面评论相关的功能。 重要的是 以上错误是在删除计划的 post 时出现的。我们已经获得 publish_pages 的许可。我附上了它的图片。

Facebook登录并分享依赖

implementation 'com.facebook.android:facebook-login:5.8.0'
implementation 'com.facebook.android:facebook-share:5.8.0'

所以我请求您检查并验证上述问题。 让我知道进一步的过程和解决方案。

谢谢。

Below peace of code I am using for delete posts.

/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/" + "post_id",
    null,
    HttpMethod.DELETE,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();

这里我直接传了一个post_id用于delete scheduledpost。 它在 Graph API v7.0.

之前完美运行

但在弃用 publish_pagesmanage_pages 权限后,它不起作用。

Solution

我在 post_id 之前添加了 page_id 像这样

"PAGE_ID" + "_" + "POST_ID"

/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/" + "page_id" + "_" + "post_id",
    null,
    HttpMethod.DELETE,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();

它很有魅力。