javascript - instafeed.js 获取特定用户喜欢的媒体列表

标签 javascript instagram instafeedjs

我想收集特定用户喜欢的所有图像。 我有访问 token 。 找不到如何通过 instafeed.js 插件实现此目的

最佳答案

用于获取用户喜欢的媒体列表的 Instagram API 端点仅适用于当前经过身份验证的用户,而不适用于任何特定用户。

https://api.instagram.com/v1/users/self/media/liked?access_token=ACCESS-TOKEN

enter image description here

如果这就是您想要的,那么 instafeed.js 目前不支持此端点:(

好消息是this pull request关于 instafeed.js repository在github上实现了终点。

enter image description here

The owner instafeed.js 尚未将其合并到主存储库/源代码中,但如果您需要此功能,可以下载此提交,或将突出显示的代码合并到 instafeed.js javascript 文件的本地副本中并尝试一下。

    case "liked":
      if (typeof this.options.accessToken !== 'string') {
        throw new Error("No access token. Use the 'accessToken' option.");
      }
      endpoint = "/users/self/media/liked";
      break;

关于javascript - instafeed.js 获取特定用户喜欢的媒体列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32279838/

相关文章:

javascript - 重新加载es6类

javascript - 在 Node 脚本中包含 "no-color"选项?

javascript - 使用 jQuery 隐藏具有重复数据的 div

api - Instagram API 为 Callback_Url 错误返回无效格式

rest - 当我尝试使用 Instagram API 连接到 oauth2.0 时,我从 api.instagram.com 返回了 400 - Bad Result。为什么?

javascript - Instafeed.js - 如何过滤或排除特定图像或用户?

javascript - 播放dialogflowAPI音频响应的Web应用程序

javascript - 为 instafeed 生成的每个列表项生成 id

oauth-2.0 - 获取Instagram的页面信息