Google-api-javascript-client: gapi.auth is undefined

Created on 10 Jul 2015  路  1Comment  路  Source: google/google-api-javascript-client

Simply loading SDK like:

<script type="text/javascript">
    (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
</script>

I would like to use gapi.auth.authorize unfortunately gapi.auth object is undefined though gapi is available.

Most helpful comment

The problem was in documentation missing the right file, src should be https://apis.google.com/js/client.js, found this in samples.

>All comments

The problem was in documentation missing the right file, src should be https://apis.google.com/js/client.js, found this in samples.

Was this page helpful?
0 / 5 - 0 ratings