gapi ist nicht definiert - Google-Anmeldung stört gapi.auth2.init

Ich versuche, Google Sign In zu implementieren und die Profilinformationen des Nutzers abzurufen. Der Fehler lautet: Uncaught ReferenceError: gapi ist nicht definiert. Warum das

<!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>

Antworten auf die Frage(8)

Ihre Antwort auf die Frage