react-native-snapchat-login
npm install react-native-snapchat-logindiff
- import com.reactlibrary.SnapchatLoginPackage;
+ import com.mduthey.snapchat.SnapchatLoginPackage;
`
Thanks @velhariGetting started
$ npm install react-native-snapchat-login --save$3
On iOS use CocoaPods
$ react-native link react-native-snapchat-loginManual steps
#### iOS
Add to
Info.plist`
SCSDKClientId
YOUR CLIENT ID SCSDKRedirectUrl
YOUR REDIRECT URL
SCSDKScopes
https://auth.snapchat.com/oauth2/api/user.display_name
https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar
LSApplicationQueriesSchemes
snapchat
bitmoji-sdk
itms-apps
`REMEMBER Add the app url to your URL Types on Xcode config.
Update the
AppDelegate.m`objc
#import - (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary *)options {
if ([SCSDKLoginClient application:application openURL:url options:options]) {
return YES;
}
return NO;
}
`#### Android
Update
android/build.gradle with the min SDK Version
`
minSdkVersion = 19
`
and add
`
maven {
url "https://storage.googleapis.com/snap-kit-build/maven"
}
`
to your repositories list.Update
AndroidManifest.xmlAdd the INTERNET permission
`
`Add this to your application
`
android:scheme="the scheme of your redirect url"
android:host="the host of your redirect url"
android:path="the path of your redirect url"
/>
`Create a new file
values/arrays.xml
`
- https://auth.snapchat.com/oauth2/api/user.display_name
- https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar
`Usage
`javascript
import SnapchatLogin from 'react-native-snapchat-login';// TODO: What to do with the module?
SnapchatLogin;
``