【问题标题】:how does GitHub support oembed?GitHub 是如何支持 oembed 的?
【发布时间】:2017-06-09 10:42:43
【问题描述】:

GitHub 如何支持 oembed?

根据这个古老的要点 https://gist.github.com/skabber/54099

// URL scheme: http://gist.github.com/*
// API endpoint: http://gist.github.com/services/oembed/
// Example call: http://gist.github.com/services/oembed/?url=http%3A//gist.github.com/54099

但不幸的是,这不起作用。 (我得到 http 404)

现在我知道 GitHub 允许 oembed,因为我可以在 medium.com 上的文章中嵌入 sn-ps

谁能告诉我访问 GitHub Oembed 服务所需的 URL 吗?

附言 只是为了帮助:如果我问的是 Flick 而不是 GitHub 的问题,这个 URL 将是正确的答案: http://www.flickr.com/services/oembed/?format=json&url=http%3A//www.flickr.com/photos/bees/2341623661/

附言二 如果有人想知道我为什么要这样做,那是因为我想查看 GitHub 提供的 JSON 响应

【问题讨论】:

    标签: github oembed


    【解决方案1】:

    GitHub 不为其 url 提供 oEmbed 支持。您可以使用此 oEmbed tester 进行测试,它会告诉您该站点不支持 oEmbed。

    Medium 不会在 oEmbed 元的帮助下展开其内容。它只是拍摄内容的快照(在浏览器中打开相同的 url 内容时会显示)。通过嵌入谷歌文档内容来尝试相同的操作。您可以清楚地了解媒体的作用。

    Medium 使用 embed.ly,这是一个提供嵌入内容的 API 提供商,可以轻松添加到您的网站。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-21
      相关资源
      最近更新 更多