首页 > 解决方案 > 加载资源失败:服务器在向我的网站添加 google+ 评论时响应状态为 404 ()

问题描述

这是带有代码的链接。 在此处输入图像描述 https://dogemap.com/comments.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <p>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi expedita
      quod excepturi, nostrum laudantium nihil, voluptate placeat sed aspernatur
      quisquam sunt accusantium debitis mollitia quibusdam hic, eveniet quidem
      voluptates corrupti.
    </p>
    <hr />
    <script src="https://apis.google.com/js/plusone.js"></script>
    <div id="comments"></div>
    <script>
      console.log("web page url:" + window.location);
      gapi.comments.render("comments", {
        href: window.location,
        width: "624",
        first_party_property: "BLOGGER",
        view_type: "FILTERED_POSTMOD"
      });
    </script>

    <hr />
  </body>
</html>

通过以下链接显示以下错误

https://apis.google.com/u/0/_/widget/render/comments?usegapi=1&href=https%3A%2F%2Fdogemap.com%2Fcomments.html&width=624&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&origin=https%3A% 2F%2Fdogemap.com&search=&hash=&gsrc=3p&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.NiyWKb0spSU.O%2Fam%3DwQ%2Frt%3Dj%2Fd% 3D1%2Frs%3DAGLTcCMXphmaCtjiU8wyjr_fEsh11HPRog%2Fm%3D__features__#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Cscroll%2Copenwindow&id=I0_1552235795048&_gfid=I0_1552235795048&parent=https%3A%2F%2Fdogemap.com&pfname=&rpctoken= 30025092

标签: javascriptcommentsgoogle-plus

解决方案


Plus API,包括不受支持的用于向网站添加评论的 API,已停止使用,没有替代品。

您不能将“Google+ 评论”添加到网站。


推荐阅读