如何将IPFS图像用作Twitter卡图像?
我希望能够允许客户在那里设置自己的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以切换到列出的公共网关之一在这里。我的个人喜好是
dweb.link
和storegation.link
by nft.storage < /a>。You can switch to one of the public gateways listed here. My personal preferences are
dweb.link
andstorage.link
by NFT.storage.