通过Facebook Graph API发布到Instagram-无法获得正确的IG-User-ID许可

发布于 2025-02-05 11:38:25 字数 1790 浏览 4 评论 0 原文

我需要创建一个元应用程序,该应用程序在公司的Instagram页面上发布了计划的内容。该应用现在处于开发模式,并通过图API和卷曲使用。

ig> ig-user-id 通过 get/code> get/v1> api调用,我将进行集装箱生成调用,如文档

curl -i -X POST https://graph.facebook.com/{{ig-user-id}}/media?
image_url=https://{{image-url}}&caption={{text}}&access_token={{token}}

我作为响应得到的内容:

Unsupported post request. Object with ID '{{ig-user-id}}' does not exist, cannot be 
loaded due to missing permissions, or does not support this operation.

尽管用户令牌,我还是尝试生成页面令牌,尽管图形API提供了使用过的scoped应用ID,但使用页面ID结果一直是相同的。我注意到的一件事是,试图按照入门页面,第5点,满足我的要求:

curl -i -X GET "https://graph.facebook.com/v13.0/{{page-id}}?
fields=instagram_business_account&access_token={{token}}"

响应只是 {“ id”:“ {{page-id}}}”} ,尽管有预期

{
  "instagram_business_account": {
    "id": "17841405822304914"  // Connected IG User ID
  },
  "id": "134895793791914"  // Facebook Page ID
}

的可能是许可问题。现在,在该应用程序相关的业务设置上,该应用程序相关:

  • 我列出了用户 - >作为管理员和开发人员,
  • 我被列出的人为 - > Instagram帐户 - > 消息(仅在Instagram上可用)
  • 拥有所有权限(内容,社区活动等)的人,但我列出了我在帐户上的 - >应用 - > {{app name}} - >人们两次获得所有授予的许可。

谁能帮我解决这个问题?提前致谢。

I need to create a Meta application that posts scheduled content on the Instagram page of the company. The app is now in dev mode, and used through the Graph API and cURL.

After getting an Instagram user token on the Graph Explorer with all the required permissions (email, pages_show_list, ads_management, business_management, instagram_basic, instagram_content_publish, publish_to_groups, pages_read_engagement, pages_manage_posts, public_profile) and getting the ig-user-id through the GET /v13.0/me?fields=id,name API call, i make the container generation call, as described in the docs:

curl -i -X POST https://graph.facebook.com/{{ig-user-id}}/media?
image_url=https://{{image-url}}&caption={{text}}&access_token={{token}}

To which I get as a response:

Unsupported post request. Object with ID '{{ig-user-id}}' does not exist, cannot be 
loaded due to missing permissions, or does not support this operation.

I tried to generate a Page token in spite of an User token, to use the Page ID in spite of the Used scoped app ID provided by the Graph API but the result has always been the same. One thing I noticed is, trying to get the IG user ID as described on the getting started page, point 5, to my request:

curl -i -X GET "https://graph.facebook.com/v13.0/{{page-id}}?
fields=instagram_business_account&access_token={{token}}"

The response is just {"id":"{{page-id}}"} in spite of the expected

{
  "instagram_business_account": {
    "id": "17841405822304914"  // Connected IG User ID
  },
  "id": "134895793791914"  // Facebook Page ID
}

So it appears it might be a permissions issue. Now, on the Business Settings for the business the app is related:

  • I'm listed under Users -> People as Administrator and Developer
  • I'm listed under Account -> Instagram Account -> People with all the permissions (Content, Community Activity, etc.) granted but messages (Impossible to assign - Available only on Instagram)
  • I'm listed onder Account -> Apps -> {{App Name}} -> People twice with all permissions granted.

Could anyone help me solve the issue? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文