# Instagram oneboxing

**URL:** https://meta.discourse.org/t/instagram-oneboxing/69099
**Category:** Feature
**Created:** [2017年八月30日 21:06 UTC](https://meta.discourse.org/t/instagram-oneboxing/69099 "2017-08-30T21:06:12Z")
**Posts on this page:** 1
**Showing post:** 98

<div class="post-metadata">

### Author: ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)
#### Post date: [2019年八月15日 17:19 UTC](https://meta.discourse.org/t/instagram-oneboxing/69099/98 "2019-08-15T17:19:40Z")

</div>

跟进一下，我注意到我们网站上的 Instagram 嵌入卡片（oneboxes）已损坏……

> [@techAPJ](#):
>
> 我会让 Instagram 的图片和视频 URL 被视为相同，并显示视频预览图而不是 mp4 视频。由于我们本地下载嵌入卡片图片，图片将保持可用。例如，上面 @codinghorror 发布的 Instagram 视频链接的预览图将是：

这是否意味着 Instagram 嵌入卡片的预览图将不再损坏？如果是这样，目前对我们来说似乎并未生效。这可能仅针对视频帖子（我不确定，因为我们网站上几乎所有的示例都是视频）。

例如，我们网站上的这条帖子（仅几周前发布）：[Forearm rotation clip on this blog? - #4 by Troy - Playing Technique - The Cracking the Code Forum](https://forum.troygrady.com/t/forearm-rotation-clip-on-this-blog/18371/4?u=brendan)

其他几条帖子也是如此。重建帖子_确实_可以修复，例如重建后显示如下：[Black star lick HELP ME - #8 by Troy - Playing Technique - The Cracking the Code Forum](https://forum.troygrady.com/t/black-star-lick-help-me/10934/8?u=brendan)

我看到本主题中上方的一些视频嵌入仍然有效，所以不确定是否还有其他变量导致这仅针对某些账户发生。

如果这是 Instagram 的有意行为且没有简单的解决方法，那么以下建议很好：

> [@Richie](#):
>
> 如果不完全了解 Instagram 如何通过其 CDN 构建嵌入式媒体 URL，Discourse 能否自动更新这些签名？

基本上——每天或每周运行一次作业（不确定 Instagram 嵌入的过期时间具体多长），匹配 `https://www.instagram.com/p/` 模式，运行 [https://meta.discourse.org/t/rebake-all-posts-matching-a-pattern/48713，我认为这就能解决问题。](https://meta.discourse.org/t/rebake-all-posts-matching-a-pattern/48713%EF%BC%8C%E6%88%91%E8%AE%A4%E4%B8%BA%E8%BF%99%E5%B0%B1%E8%83%BD%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98%E3%80%82)

---

_[View the full topic](https://meta.discourse.org/t/instagram-oneboxing/69099)._
