react-native-wixanswers-sdk
v0.0.63
Published
Wix Answers Mobile SDK
Downloads
6
Maintainers
Keywords
Readme
react-native-wixanswers-sdk
Wix Answers SDK enables your users to access the Wix Answers widget from inside your application. Your users will have access to all of the existing widget features:
- Live chat
- KB articles
- Contact form
- Request callback
- and more!
Getting started
$ npm install react-native-wixanswers-sdk --save
$ cd ios && pod install
See the corresponding documentation for additional configuration and options:
- iOS - https://github.com/wix-private/wix-answers/blob/master/answers-client/mobile/ios/README.md
- Android - https://github.com/wix-private/wix-answers/blob/master/answers-client/mobile/android/README.md
Note: This module does not support Expo.
Usage
import WixanswersSdk from 'react-native-wixanswers-sdk';
WixanswersSdk.configure('TENANT_NAME', 'WIDGET_ID', async (setToken) => {
const token = await MY_USER_AUTHENTICATION_FUNCTION(); // <-- implement this function to authenticate via your own server
setToken(token);
}, 'OPTIONAL_LOCALE');
// after the SDK is configured
WixanswersSdk.openWidget();