标签: instagram-graph-api

Instagram API 弃用 2020

我正在构建一个应用程序,让用户通过 Instagram 登录,然后读取他们的提要并将该信息用于应用程序。Instagram 有一个页面说他们的 API 将在 2020 年被弃用,但有些东西仍然有效。至于什么被弃用,什么不是,这并不简单,我还没有找到任何直接联系他们的方法。有谁知道以下 URL 是否会继续工作,如果不会,这种类型的应用程序将来是否可行?为什么 IG 和 Facebook 对 3rd 方集成变得更加封闭?

https://api.instagram.com/v1/users/self/media/recent/

弃用通知:https : //www.instagram.com/developer/

在此处输入图片说明

facebook facebook-graph-api instagram instagram-graph-api

7
推荐指数
1
解决办法
1万
查看次数

使用 API 发送 Instagram DM

我目前正在尝试找到一种通过 API 将 Instagram DM 发送给特定用户的方法(我正在构建一个 iOS 应用程序,这是我试图构建的功能之一)。我知道目前有一些解决方案(如 Jarvee 或 Instazood)提供了这些解决方案,但它们似乎都没有提供允许我在自己的应用程序中执行此操作的 API。鉴于 Instagram 当前似乎允许 DM 的 Instagram API 遗产将在 12 月 1 日停止,我似乎无法找到使我能够做到这一点的选项。有什么想法吗?

ios instagram-api instagram-graph-api

6
推荐指数
1
解决办法
1万
查看次数

使用 Instagram API 获取关注者和关注者

我正在研究将 Instagram 集成到我的应用程序中。但我有些困惑。我找到了 2 个 API 文档:https://www.instagram.com/developer/https://developers.facebook.com/docs/instagram-api/。他们在支持 API Endpoints 以及如何使用方面存在差异。那么,它们是什么,我们应该为我的应用程序使用什么?

我需要获得关注者和用户关注。但是我找不到对该功能的任何 API 支持。

你能帮忙吗,我的应用程序真的需要它。

非常感谢

php api server instagram-api instagram-graph-api

6
推荐指数
1
解决办法
1万
查看次数

Instagram Graph API-当用户从个人帐户切换为企业帐户时,获取媒体见解指标

我正在寻找一种使用基于userId的嵌套查询在Instagram Graph API(https://developers.facebook.com/docs/instagram-api/reference/media/insights)中获取Media Insights指标的方法,即使在客户从个人帐户切换到企业帐户。

我使用此嵌套查询来获取我需要的所有数据:(https://graph.facebook.com/v3.2/{userId}?fields=followers_count,media{media_type,caption,timestamp,like_count,insights.metric(reach, impressions)}这部分会导致错误:insights.metric(reach,impressions) -但对于一直是企业帐户的帐户而言,它仍然有效)

但是,由于链接到userId的某些媒体是在用户切换到企业帐户之前发布的,而不是仅返回之后发布的媒体的数据,因此API返回此错误:

{
    "error": {
        "message": "Invalid parameter",
        "type": "OAuthException",
        "code": 100,
        "error_data": {
            "blame_field_specs": [
                [
                    ""
                ]
            ]
        },
        "error_subcode": 2108006,
        "is_transient": false,
        "error_user_title": "Media Posted Before Business Account Conversion",
        "error_user_msg": "The media was posted before the most recent time that the user's account was converted to a business account from a personal account.",
        "fbtrace_id": "Gs85pUz14JC"
    }
}
Run Code Online (Sandbox Code Playgroud)

是否可以通过API知道帐户从“个人”切换到“企业”之前和之后创建了哪种媒体?还是有办法获取帐户切换的日期?

我目前看到的获取所需数据的唯一方法是使用/media边缘并查询每种媒体的见解,直到出现错误为止。然后,我大概会得到所需的日期。但是,由于我们的速率限制为每小时每位用户200个呼叫,因此根本没有优化。

facebook-graph-api instagram-graph-api

6
推荐指数
1
解决办法
633
查看次数

使用 Instagram 图形 API 获取 Instagram 媒体 ID 的用户名和时间戳

我想在 Instagram 上找到所有带有特定主题标签的最新媒体。它在这里描述

要获取带有我使用过的特定主题标签的媒体:

GET graph.facebook.com/17873440459141021/recent_media?user_id=17841405309211844
Run Code Online (Sandbox Code Playgroud)

结果是IG 媒体ID列表

问题是我无法在ig 媒体节点中使用该 ID来获取用户名和时间戳。这个节点在 ig_id 上运行,我只有一个 id。

可以向最近的媒体节点添加字段,但无法获取时间戳和用户名。

有谁知道如何从 Instagram 媒体 ID 获取用户名和时间戳?

facebook-graph-api instagram instagram-graph-api

6
推荐指数
0
解决办法
555
查看次数

如何使用 instagram graph api 获取用户电子邮件和全名

我正在使用消费者 Facebook 开发者帐户。我需要从以下端点获取用户媒体信息。特别需要获取用户全名、邮箱和头像url

要求:

https://graph.instagram.com/{user-id}?fields=id,username,account_type,media_count&access_token=xxxxxxxxxxxxxxxxxxxxxxx
Run Code Online (Sandbox Code Playgroud)

回复:

{
  id: "3454354543543345",
  username: "test",
  account_type: "PERSONAL",
  media_count: 22
}
Run Code Online (Sandbox Code Playgroud)

引用自文档:getting-profile-info user-fields

instagram-graph-api

6
推荐指数
1
解决办法
975
查看次数

Instagram 基本显示 API 获取请求不起作用?

我正在尝试根据之前对 Instagram 的请求收到的短期令牌来执行基本的获取请求。我知道短期访问令牌是有效的。我正在测试的帐户是测试用户,该应用程序在 Facebook 端处于开发模式。此外,应用程序审核目前正在等待,但我认为这不是问题,因为我正在测试的帐户是测试帐户,而且登录功能设置为开发模式。

当我根据文档提出请求时:

https://developers.facebook.com/docs/instagram-basic-display-api/guides/long-lived-access-tokens/

我收到以下响应,状态代码为 400:

抱歉,该内容目前不可用

基于此请求格式:

  https://graph.instagram.com/access_token
  ?grant_type=ig_exchange_token
  &client_secret={instagram-app-secret}
  &access_token={short-lived-access-token}
Run Code Online (Sandbox Code Playgroud)

以下是完整回复:

HTTP/1.1 400 Bad Request
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Vary: Origin
Content-Type: application/json; charset=UTF-8
WWW-Authenticate: OAuth "Facebook Platform" "invalid_token" "Invalid OAuth access token."
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=15552000
Pragma: no-cache
Cache-Control: no-store
Expires: Sat, 01 Jan 2000 00:00:00 GMT
x-fb-request-id: Al1knRjoI2Qw1XEVlh4b3Ku
x-fb-trace-id: GasPh1zh4bl
x-fb-rev: 1004118369
X-FB-Debug: 73PsZ2YPe6C2obr8nIdox2r2YOtNoVsuva4y2rRLvd70l06oV8kfdjOzLRhPvLDvpsmc1+5gP42Hc4Pi4AUHLw==
Date: Fri, 16 Jul 2021 04:19:09 GMT
X-FB-TRIP-ID: 1512268381
Connection: keep-alive
Content-Length: 45

Sorry, this content isn't …
Run Code Online (Sandbox Code Playgroud)

instagram instagram-api instagram-graph-api

6
推荐指数
2
解决办法
5815
查看次数

检查容器状态时 Instagram Graph API 400 响应错误

在简单的 Instagram Graph API 请求上遇到错误。我正在尝试在发布视频容器之前检查其状态。

如果我跳过这一步,休眠 30 秒(以确保 Facebook 服务器有足够的时间来处理容器)并直接发布,它就可以工作。所以您知道容器 ID 和用户访问令牌都是准确的。

但是如果我插入这个状态检查步骤,响应400,错误的请求等。响应的内容是“抱歉,此内容现在不可用”

这是官方文档的链接:https://developers.facebook.com/docs/instagram-api/reference/ig-container

下面是我的代码。有任何想法吗?

编辑:弄清楚了。文档说该 URL 是 graph.instagram.com,但它应该是 graph.facebook.com。文档有误吗?

    url = f"https://graph.instagram.com/{container_id_response.json()['id']}"
    container_ready = False
    while not container_ready:
        time.sleep(3)
        # Check status
        params = {"fields": "status,id",
                  "access_token":credentials['FB_USER_ACCESS_TOKEN']}
        response = status_response = requests.get(url, params=params)
        if response.json()['status_code'] == "FINISHED":
            container_ready = True

Run Code Online (Sandbox Code Playgroud)

python facebook-graph-api python-requests instagram-graph-api

6
推荐指数
0
解决办法
650
查看次数

不支持的请求 - 方法类型:get

我们的应用程序开始在一个非常基本的获取上收到以下错误消息,该获取直到最近都工作得很好

https://graph.instagram.com/v12.0/me?access_token=<IG...>

{
   "error": {
      "message": "Unsupported request - method type: get",
      "type": "IGApiException",
      "code": 100,
      "fbtrace_id": "A2KKkkTQ2nn70IQPCGKcKVB"
   }
}
Run Code Online (Sandbox Code Playgroud)

这是什么错误?这已经工作了几个月,看起来新创建的 access_token 没有问题......

facebook-graph-api instagram-api instagram-graph-api

6
推荐指数
1
解决办法
4949
查看次数

使用 Instagram Graph API 发布照片时是否可以邀请协作者?

2021 年 10 月,Instagram 推出了一项名为“协作”的新功能,允许人们共同创作 Feed 帖子和 Reels。发帖时(仅在应用程序中),您可以“邀请协作者”。这使用类似的界面来标记用户,感觉像是相关的。

https://www.instagram.com/p/CVOKMVNARZX/

我们有一个使用 Instagram Graph API 的内容发布的工作实现。发布媒体时,您可以使用 user_tags 标记其他用户。

https://developers.facebook.com/docs/instagram-api/guides/content-publishing#publish-with-tagged-users

POST graph.facebook.com/17841400008460056/media? 
image_url=https//www.example.com/images/bronzed-fonzes.jpg
&caption=#BronzedFonzes!
&user_tags=
[
  {
    username:'kevinhart4real',
    x: 0.5,
    y: 0.8
  },
  {
    username:'therock',
    x: 0.3,
    y: 0.2
  }
]
Run Code Online (Sandbox Code Playgroud)

我们希望使用 API 将协作者标记到已发布的媒体。元文档中似乎没有,但这可能吗?再次,感觉它与 user_tags 变量有关。

instagram instagram-api instagram-graph-api

5
推荐指数
1
解决办法
644
查看次数