Search code examples
google-apimeteor

Add Google API to meteor project


i'm trying to link Google API to my meteor project but cant seem to make it load. Docs say to add

script src="https://apis.google.com/js/client.js?onload=OnLoadCallback"></script>

to the header, which we cant do straight in meteor.

I tried getting a local copy of the script and adding it to client folder but still get 'gapi is not defined' when loading. This approach worked with filepicker.io but not on this one.

Any idea where or how to load the library?


Solution

  • Found out: The best way was to use Google RESTful api. You can see a working example at This SO Question