我正在尝试使用主题标签获取公共(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 ,这只会返回受邀加入您的沙箱的用户的标记图片。
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/