A) <script src="https://apis.google.com/js/platform.js"></script>
versus
B) <script src="https://apis.google.com/js/api.js"></script>
I am a little bit confused about how to use Google OAuth service, should I use platform script or api script.
GAPI is Google's client library for browser-side JavaScript. It's used in Google Sign-in, Google Drive, and thousands of internal and external web pages for easily connecting with Google APIs.
platform. js is a platform detection library that works on nearly all JavaScript platforms. platform. js is for informational purposes only & not intended as a substitution for feature detection/inference checks.
The functionality in platform.js is a superset of the functionality in api.js. If you are using both the sheets APIs and the sign-in API, platform.js will suffice, you needn't load both. ~https://github.com/google/google-api-javascript-client/issues/658
platform.js is a platform detection library that works on nearly all JavaScript platforms. platform.js is for informational purposes only & not intended as a substitution for feature detection/inference checks. platform.js is Google's library for accessing the Google Plus API.
Platform.js is part of the BestieJS “Best in Class” module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, & plenty of documentation.
Using the platform.js library, it becomes very easy for us to detect the browser just by writing one line of JavaScript code. You can get this library on GitHub. All the complicated code is already written in this library and we just have to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With