javascript - gapi.client is undefined -- firefox add-on sdk -
javascript - gapi.client is undefined -- firefox add-on sdk -
following these instructions: https://developers.google.com/+/web/api/javascript
<script type="text/javascript"> (function() { var po = document.createelement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/client:plusone.js?onload=signin'; var s = document.getelementsbytagname('script')[0]; s.parentnode.insertbefore(po, s); })(); </script>
inserted before tag...
the gapi object available within signout() callback not include gapi.client .. in fact, getting gapi.client undefined js error.
i cannot phone call gapi.client.load('drive', 'v2', callback) since client property undefined.
this issue when using firefox add-on sdk , using cfx run open browser add-on developing beingness sidebar element.
can tell me doing wrong? can provide more info if necessary!
the problem loading google js api doesn't happen immediately. instead, specify callback function (in illustration it's signin function -- ?onload=signin
) , in function can rely on gapi.client , other methods.
i didn't expect such poor api quality google, it's messed up.
javascript firefox google-api google-plus firefox-addon-sdk
Comments
Post a Comment