1.1.3 • Published 4 years ago
cordova-plugin-zalo-login v1.1.3
cordova-plugin-zalo-login
Use Zalo SDK in Cordova projects
Table of contents
Release (1.1.2)
Update new ZaloSDK which for Zalo login v4.
Installation
See npm package for versions - https://www.npmjs.com/package/cordova-plugin-zalo-login
Make sure you've registered your Zalo app with Zalo and have an ZALO_APP_ID https://developers.zalo.me/app.
$ cordova plugin add cordova-plugin-zalo-login --save --variable ZALO_APP_ID="123456789"If you need to change your ZALO_APP_ID after installation, it's recommended that you remove and then re-add the plugin as above. Note that changes to the ZALO_APP_ID value in your config.xml file will not be propagated to the individual platform builds.
Android config.xml
    <edit-config xmlns:android="http://schemas.android.com/apk/res/android" file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
        <application android:name="com.zing.zalo.zalosdk.oauth.ZaloSDKApplication" />
    </edit-config>Compatibility
- Cordova >= 5.0.0
- cordova-android >= 7.0.0
- cordova-ios > 5.0.0
Zalo SDK
API
Login
In your onDeviceReady event add the following
zaloLoginPlugin.login([], function loginSuccess(data){
    console.log(data)
    },
  function loginError (error) {
    console.error(error)
  }
);