通过 Instagram API 和 Graph API 搜索最近的媒体和评论
Search recent media and comment via Instagram API and Graph API
我想构建一个应用程序用户可以从应用程序内部访问的应用程序
- 通过搜索词搜索 Instagram 的最新媒体(Hashtag-Search)
- post 对 Instagram 的评论 posts
无法使用 Graph API 搜索 Instagram,因为它没有这种功能。因此我需要使用旧版 Instagram API,对吗?但 Instagram 表示 "The Instagram Graph API is Now Available to All Developers. For Non-Business Instagram Accounts please continue to use the existing Instagram Platform API"。我平台的用户拥有我需要的商业账户,我需要通过图表 post 发表评论 API。
我是否必须使用 Instagram API 进行应用程序用户的搜索 (1.) 并使用图表 API 进行 post 评论 (2.)?
是否有其他不违反 Instagram 政策的 Instagram 媒体搜索方式?
是的,您需要同时使用两个 API;换句话说,必须为同一个 Instagram 帐户获得两个应用程序的访问令牌,对每个 API 的身份验证进行 oauth 握手。
另请注意 - 对于您的第一个要求:在 Instagram API 中通过主题标签搜索媒体,您需要您的应用具有 public_content
范围; Instagram 不再批准新应用程序。因此,除非您已经拥有适用于 Instagram 的此范围的 oauth 应用 API;很可能无法使用开发人员 api 进行搜索。
对于有限的标签搜索,您可以使用 public 网络 api:
https://www.instagram.com/explore/tags/{tagName}/?__a=1
例如:https://www.instagram.com/explore/tags/apple/?__a=1
这只是针对最近的媒体 - 我想,这 API 不能保证所有媒体。
这不再正确。
图 API 有端点 ig_hashtag_search,它将找到主题标签的 ID。然后,您可以使用它在端点 recent_media 和 top_media.
上搜索媒体
我想构建一个应用程序用户可以从应用程序内部访问的应用程序
- 通过搜索词搜索 Instagram 的最新媒体(Hashtag-Search)
- post 对 Instagram 的评论 posts
无法使用 Graph API 搜索 Instagram,因为它没有这种功能。因此我需要使用旧版 Instagram API,对吗?但 Instagram 表示 "The Instagram Graph API is Now Available to All Developers. For Non-Business Instagram Accounts please continue to use the existing Instagram Platform API"。我平台的用户拥有我需要的商业账户,我需要通过图表 post 发表评论 API。
我是否必须使用 Instagram API 进行应用程序用户的搜索 (1.) 并使用图表 API 进行 post 评论 (2.)?
是否有其他不违反 Instagram 政策的 Instagram 媒体搜索方式?
是的,您需要同时使用两个 API;换句话说,必须为同一个 Instagram 帐户获得两个应用程序的访问令牌,对每个 API 的身份验证进行 oauth 握手。
另请注意 - 对于您的第一个要求:在 Instagram API 中通过主题标签搜索媒体,您需要您的应用具有 public_content
范围; Instagram 不再批准新应用程序。因此,除非您已经拥有适用于 Instagram 的此范围的 oauth 应用 API;很可能无法使用开发人员 api 进行搜索。
对于有限的标签搜索,您可以使用 public 网络 api:
https://www.instagram.com/explore/tags/{tagName}/?__a=1
例如:https://www.instagram.com/explore/tags/apple/?__a=1
这只是针对最近的媒体 - 我想,这 API 不能保证所有媒体。
这不再正确。 图 API 有端点 ig_hashtag_search,它将找到主题标签的 ID。然后,您可以使用它在端点 recent_media 和 top_media.
上搜索媒体