我正在尝试实现谷歌登录和检索用户的个人资料信息。错误是:未定义ReferenceError: gapi。为什么会这样呢?
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script type="text/javascript">
$(function(){
gapi.auth2.init({
client_id: 'filler_text_for_client_id.apps.googleusercontent.com'
});
});
</head>
<body>
</body>
</html>
https://stackoverflow.com/questions/31144874
复制相似问题