如何将IPFS图像用作Twitter卡图像?

发布于 2025-02-03 21:19:51 字数 764 浏览 3 评论 0原文

我希望能够允许客户在那里设置自己的Twitter卡数据,并使用来自那里的网站或IPF来源的图像。作为测试,我制作了一个带有以下元标记(从市场复制)的页面,

<meta name="twitter:card" content="summary_large_image" /> 
<meta name="twitter:site" content="https://digiassetX.com/market/#DCbR5qt3BcozuSsu49MeocXvfHkEESf5NL" /> 
<meta name="twitter:title" content="Altar of DigiByte" /> 
<meta name="twitter:description" content="Worlds first MineCraft world DigiAsset.  Take a look around the infinit minecraft world but first hike up to the DigiByte alter where treasures await." /> 
<meta name="twitter:image" content="https://cloudflare-ipfs.com/ipfs/QmXLXP4VBxvAMJtsAhqaPt6koazBpQSzha5EDqpMhdDtKf" />

它显示了除图像之外的所有内容。我怀疑问题是Twitter不会从Cloudflare获得数据,还有其他IPFS网关可以从中获得它还是我需要更改的东西?

I want to be able to allow clients to set there own twitter card data with image sourced from there own site or from IPFS. as a test I made a page with the following meta tags(copied from a market)

<meta name="twitter:card" content="summary_large_image" /> 
<meta name="twitter:site" content="https://digiassetX.com/market/#DCbR5qt3BcozuSsu49MeocXvfHkEESf5NL" /> 
<meta name="twitter:title" content="Altar of DigiByte" /> 
<meta name="twitter:description" content="Worlds first MineCraft world DigiAsset.  Take a look around the infinit minecraft world but first hike up to the DigiByte alter where treasures await." /> 
<meta name="twitter:image" content="https://cloudflare-ipfs.com/ipfs/QmXLXP4VBxvAMJtsAhqaPt6koazBpQSzha5EDqpMhdDtKf" />

It shows everything except the image correctly. I suspect the problem is twitter won't get data from cloudflare is there another IPFS gateway they can get it from or some thing I need to change?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深巷少女 2025-02-10 21:19:51

您可以切换到列出的公共网关之一在这里。我的个人喜好是dweb.linkstoregation.link by nft.storage < /a>。

You can switch to one of the public gateways listed here. My personal preferences are dweb.link and storage.link by NFT.storage.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文