【问题标题】:I am getting an error when deleting the scheduled Facebook page post: pages_manage_engagement are not available删除预定的 Facebook 页面帖子时出现错误:pages_manage_engagement 不可用
【发布时间】:2020-11-02 10:17:50
【问题描述】:

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

对于上述功能,我们已经通过 App Review 获得了所需的权限(publish_pages、manage_pages)。

所有功能都可以在我们的 Android 和 iOS 平台上完美运行。但在过去的几周里,我们在删除 Android 平台上的日程安排帖子时遇到了错误。当我们在 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”权限用于“创建、编辑和删除您的页面发布的cmets”。 我们没有在页面上提供任何与 cmets 相关的功能。 重要的是删除预定帖子时出现上述错误。我们已经获得了 publish_pages 的许可。我附上了它的图片。

Facebook 登录和分享依赖

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

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

谢谢。

【问题讨论】:

    标签: android facebook facebook-graph-api facebook-login facebook-share


    【解决方案1】:

    低于我用于删除帖子的代码。

    /* 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 来删除预定的帖子。 它在 Graph API v7.0 之前完美运行。

    但是在弃用publish_pagesmanage_pages权限后,就不行了。

    解决方案

    我在 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();
    

    它就像一个魅力。

    【讨论】:

      猜你喜欢
      • 2021-09-13
      • 1970-01-01
      • 2012-12-10
      • 2021-03-19
      • 1970-01-01
      • 2016-01-21
      • 2012-10-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多