动态 OGP 元标记在 React js 应用程序中不起作用

发布于 2025-01-11 15:06:55 字数 489 浏览 3 评论 0原文

  1. 我们已经为 header.js 文件中的每个页面实现了 OGP 元标记,这些标记是从 React js 应用程序中的 CMS API 获取的。

  2. 通过使用“检查元素”选项,我们可以在浏览器中的应用程序标头部分中查看 OGP 元标记

  3. 无法获取 3rd 方元标记工具,例如 https://www.opengraph.xyz/https://developers.facebook.com/tools/debug/ 工具并且未显示在页面的“查看源代码”中 我们尝试过使用react-meta-tags和react-helmet npm包,但没有成功

  1. We have implemented OGP meta tags for each page in header.js file which are getting from CMS APIs in React js application.

  2. We are able to see the OGP meta tags in header section of application in browser by using Inspect Element option

  3. Unable to fetch the 3rd party meta tag tools like https://www.opengraph.xyz/ or https://developers.facebook.com/tools/debug/ tools and not showing in "view source" of page
    We have tried to use react-meta-tags and react-helmet npm packages but no luck

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文