javascriptgoogle-app-enginechannel-api

import appengine channel js api without script tag


I'm actually trying to use google channel api in javascript, it works perfectly with reactJS, but i would like use it on react-native.

So how can i import

<script type="text/javascript" src="/_ah/channel/jsapi"></script>

I've tried to curl sources :https://talkgadget.google.com/talkgadget/channel.js in my node module but it doesn't work (i get 401 error : invalid+token)

and as this people said on this topic : Google App Engine channel token is invalid , only <script type="text/javascript" src="/_ah/channel/jsapi"></script> works

So how i can i do make it work Google appengine channel api in Javascript in react-native?

Thanks


Solution

  • Well, i've created an npm module to import channel js api.

    https://github.com/Fantasim/app-engine-channel-js-api