Facebook Graph API我/帐户返回空数据并发布我/订阅源返回错误#200

时间:2019-05-06 06:57:39

标签: facebook facebook-graph-api

您好,我尝试在我的Facebook墙上发布一些内容(“我的用户个人资料”)。我在developers.facebook.com中创建了一个新的Facebook帐户和一个新的App。我找到了许多对我有用的解决方案。首先,我想尝试从我/帐户中获取数据,但这会返回

{
  "data": [
  ]
}

如果我尝试在墙上张贴东西,则会返回错误代码200

{
  "error": {
    "message": "(#200) If posting to a group, requires app being installed in the group, and \
          either publish_to_groups permission with user token, or both manage_pages \
          and publish_pages permission with page token; If posting to a page, \
          requires both manage_pages and publish_pages as an admin with \
          sufficient administrative permission",
    "type": "OAuthException",
    "code": 200,
    "fbtrace_id": "HSwXSilF2Dj"
  }
}

我给予自己所有许可(使用我/许可)。

我在哪里错了?

{
  "data": [
    {
      "permission": "user_birthday",
      "status": "granted"
    },
    {
      "permission": "user_hometown",
      "status": "granted"
    },
    {
      "permission": "user_location",
      "status": "granted"
    },
    {
      "permission": "user_likes",
      "status": "granted"
    },
    {
      "permission": "user_events",
      "status": "granted"
    },
    {
      "permission": "user_photos",
      "status": "granted"
    },
    {
      "permission": "user_videos",
      "status": "granted"
    },
    {
      "permission": "user_friends",
      "status": "granted"
    },
    {
      "permission": "user_status",
      "status": "granted"
    },
    {
      "permission": "user_tagged_places",
      "status": "granted"
    },
    {
      "permission": "user_posts",
      "status": "granted"
    },
    {
      "permission": "user_gender",
      "status": "granted"
    },
    {
      "permission": "user_link",
      "status": "granted"
    },
    {
      "permission": "user_age_range",
      "status": "granted"
    },
    {
      "permission": "email",
      "status": "granted"
    },
    {
      "permission": "read_insights",
      "status": "granted"
    },
    {
      "permission": "read_audience_network_insights",
      "status": "granted"
    },
    {
      "permission": "publish_video",
      "status": "granted"
    },
    {
      "permission": "manage_pages",
      "status": "granted"
    },
    {
      "permission": "pages_manage_cta",
      "status": "granted"
    },
    {
      "permission": "pages_manage_instant_articles",
      "status": "granted"
    },
    {
      "permission": "pages_show_list",
      "status": "granted"
    },
    {
      "permission": "publish_pages",
      "status": "granted"
    },
    {
      "permission": "read_page_mailboxes",
      "status": "granted"
    },
    {
      "permission": "ads_management",
      "status": "granted"
    },
    {
      "permission": "ads_read",
      "status": "granted"
    },
    {
      "permission": "business_management",
      "status": "granted"
    },
    {
      "permission": "pages_messaging",
      "status": "granted"
    },
    {
      "permission": "pages_messaging_phone_number",
      "status": "granted"
    },
    {
      "permission": "pages_messaging_subscriptions",
      "status": "granted"
    },
    {
      "permission": "instagram_basic",
      "status": "granted"
    },
    {
      "permission": "instagram_manage_comments",
      "status": "granted"
    },
    {
      "permission": "instagram_manage_insights",
      "status": "granted"
    },
    {
      "permission": "publish_to_groups",
      "status": "granted"
    },
    {
      "permission": "groups_access_member_info",
      "status": "granted"
    },
    {
      "permission": "leads_retrieval",
      "status": "granted"
    },
    {
      "permission": "public_profile",
      "status": "granted"
    }
  ]
}

编辑:

也许是因为我无法切换此按钮?如果属实,为什么我不能切换?

Toggle

1 个答案:

答案 0 :(得分:1)

无法再发布到用户个人资料,publish_actions权限已弃用。

来源:https://developers.facebook.com/docs/graph-api/changelog/breaking-changes/#24-04-2018


仍然可以发布到页面,并且您需要具有manage_pagespublish_pages的页面令牌。

有关令牌的更多信息:https://developers.facebook.com/docs/facebook-login/access-tokens/