An open API service indexing awesome lists of open source software.

https://github.com/doochik/react-native-vksdk

A wrapper around the iOS VK (VKontakte) SDK for React Native apps.
https://github.com/doochik/react-native-vksdk

Last synced: about 1 year ago
JSON representation

A wrapper around the iOS VK (VKontakte) SDK for React Native apps.

Awesome Lists containing this project

README

          

[![NPM version](https://badge.fury.io/js/react-native-vksdk.svg)](http://badge.fury.io/js/react-native-vksdk)
# react-native-vk-sdk

A wrapper around the [iOS VK (VKontakte) SDK](https://github.com/VKCOM/vk-ios-sdk) for React Native apps.

## Setup

1. Install package: `npm install react-native-vksdk`
1. Setup your app for [VK iOS SDK](https://github.com/VKCOM/vk-ios-sdk)
2. Add `VkAppID` key to Info.plist preview
3. Add `RCTVkSdkLoginManager.h` and `RCTVkSdkLoginManager.m` to you Libraries. preview

## Usage

```js
var Vk = require('react-native-vksdk');

// authorize and get token
Vk.authorize()
.then((result) => {
// your code here
}, (error) => {
// your code here
});

// logout
Vk.logout();

```