A wrapper around the iOS VK (VKontakte) SDK for React Native apps.
- Install package:
npm install react-native-vksdk
- Setup your app for VK iOS SDK
- Add
VkAppID
key to Info.plist - Add
RCTVkSdkLoginManager.h
andRCTVkSdkLoginManager.m
to you Libraries.
var Vk = require('react-native-vksdk');
// authorize and get token
Vk.authorize()
.then((result) => {
// your code here
}, (error) => {
// your code here
});
// logout
Vk.logout();