【问题标题】:Instagram Media/Feed APIInstagram 媒体/Feed API
【发布时间】:2017-09-27 01:00:28
【问题描述】:

我目前正在研究 Web 应用程序中的 Instagram 提要集成。 官方 API 为:Instagram Graph APIInstagram Platform API

然后我在 SO 上找到了一个端点,如 https://www.instagram.com/instagram/media/herehere,这似乎是一个未记录的(至少我在 facebook/instagram 文档上没有看到它)。 它是公开的,您可以获得很多关于帖子的信息,包括点赞和 cmets。

所以我的问题是:

  • https://www.instagram.com/{username}/media/ 是否记录在某个地方?
  • 它在互联网上广泛使用吗?

【问题讨论】:

标签: instagram instagram-api


【解决方案1】:

它不是官方API,它可能随时停止工作,在应用程序中使用不是一个好主意。其他 Instagram 未记录的 API 过去已停止工作,它可以用于一次性项目,但我不会在应用程序/网站中使用它。

【讨论】:

  • 你是对的,我们不应该使用未记录的 api。我想人们一定已经看到了,可能可以提供更多细节:)
  • 你可以用,我有时也用,但我不依赖它,也不用它写应用程序。
  • 请问你是做什么用的?
  • 批量获取图片链接
【解决方案2】:

此端点已于 2017 年 11 月 7 日停止工作。但您可以使用此其他端点获得相同的结果:

GET /users/user-id/media/recent
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN

Get the most recent media published by a user.
The public_content scope is required if the user is not the owner of the access_token.

REQUIREMENTS
Scope: public_content

PARAMETERS
ACCESS_TOKEN    A valid access token.
MAX_ID  Return media earlier than this max_id.
MIN_ID  Return media later than this min_id.
COUNT   Count of media to return.

https://www.instagram.com/developer/endpoints/users/#get_users_media_recent

【讨论】:

【解决方案3】:

我在打字稿上写了small library。它不需要访问令牌或客户端 ID。该库在后台使用 RegExp。你可以像这样得到你的照片:

import Nanogram from 'nanogram.js';

const instagramParser = new Nanogram();

instagramParser.getMediaByUsername('instagram').then((media) => {
  console.log(media);
 });

【讨论】:

    猜你喜欢
    • 2018-05-19
    • 2015-07-14
    • 2017-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多