我正在尝试按照此 article 为我的网站集成 google 登录按钮但我的按钮没有显示在网站上。这是html代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="MY_CLIENT_ID.apps.googleusercontent.com">
</head>
<body>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
</body>
</html>
最佳答案
您必须在他们的平台上获取客户端 ID,并将其放置在“内容”的元标记中。
这里有占位符:“MY_CLIENT_ID.apps.googleusercontent.com”。 要获取客户端 ID,您必须转到此处:https://developers.google.com/identity/sign-in/web/devconsole-project .
希望有所帮助。
关于javascript - 使用 javascript 的 Google 登录(网站),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47687205/