0.0.2 • Published 7 years ago

react-vk-login v0.0.2

Weekly downloads
29
License
MIT
Repository
github
Last release
7 years ago

React Vk Login

A Component React for Vk Login

Getting Started

git clone https://github.com/ZigGreen/react-vk-login.git && cd react-vk-login
npm install react react-dom react-vk-login --save

Development

npm start

How to use

Basic

import React from 'react';
import ReactDOM from 'react-dom';
import VkLogin from 'react-vk-login';

const responseVk = (response) => {
  console.log(response);
}

ReactDOM.render(
  <VkLogin
    appId="1088597931155576"
    autoLoad={true}
    fields="name,email,picture"
    onClick={componentClicked}
    callback={responseVk} />,
  document.getElementById('demo')
);

Parameters

paramsvaluedefault value
appIdstringRequired
sizestringsmall - medium - metro
scopestringpublic_profile, email, user_birthday
fieldsstringname,email,picture
callbackfunctionresultVkLogin
autoLoadbooleanfalse
xfbmlbooleanfalse
reAuthenticatebooleanfalse
textButtonstringLogin with Vk
cssClassstringkep-login-facebook kep-login-facebook-button-size
redirectUristringwindow.location.href (mobile-only)
versionstring2.3
iconstringelementnone
languagestringen_US
onClickfunctionInitial click on the component