jquery - 有没有什么方法可以在不使用访问 token /客户端 ID 的情况下获取特定主题标签的 Instagram 图像?

标签 jquery instagram shopify instafeedjs

我正在尝试使用主题标签获取公共(public) Instagram 图像,但这需要在不使用客户端 ID/访问 token 的情况下完成。我正在使用下面的脚本

<div id="instafeed"></div>

<script type="text/javascript">
  var userFeed = new Instafeed({
    get: 'tagged',
    tagName: 'fashion',
    template: '<a class="fancybox" href="{{link}}" rel="ig" title="{{caption}}"><img class="instagram-image" src="{{image}}" /></a>',
    links: 1,
    limit: 30,
    resolution: 'low_resolution'
  });
  userFeed.run();
</script>

但无法获取图像。 如果我尝试提供访问 token 或用户 ID,则只会获取我的 Instagram 中带有该特定主题标签的图像。 我需要在 Shopify 中实现此功能。

最佳答案

获取具有特定主题标签的所有公共(public)图像的唯一官方方法是让您的 Instagram API 客户端获得 public_content API scope 的批准。 。这需要您通过 Instagram 的 review process 提交您的 API 客户端.

如果不这样做,您的 API 客户端将被限制为 Sandbox Mode ,这只会返回受邀加入您的沙箱的用户的标记图片。

来自Instagram Developer Docs :

As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.

关于jquery - 有没有什么方法可以在不使用访问 token /客户端 ID 的情况下获取特定主题标签的 Instagram 图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39525600/

相关文章:

javascript - 尝试使用液体设置 JS 变量

jquery - 使用 JQuery 访问 JSON

javascript - 无法通过 JQuery 访问选择框

jquery - 仅处理可见表单字段以进行验证

php - 使用 PHP 从网站自动在 Instagram 中发布

ios - 将 "Facebook Login"添加到 SimpleAuth 的 Instagram 登录页面

javascript - 如何获取数组中 sibling 的id?

amazon-web-services - Instagram 如何命名文件

api - Shopify Order API 中是否公开了订单项属性?

javascript - 将 Respond.js 与 Shopify 结合使用