rn-instagram-login

1.0.6 • Public • Published

rn-instagram-login

Can be easily integrated to perform implicit Instagram authentication including Instagram's Facebook login option.

Installation

Enter it in to the terminal being in the project directory.

npm install rn-instagram-login --save

Importing

var InstagramLogin = require("rn-instagram-login") 

Example:

    <InstagramLogin
            style={{width: "100%", flex: 1}}
            clientId='CLIENT_ID'
            scopes={['PERMISSION_1', 'PERMISSION_2']}
            redirectUrl='REDIRECT_URL'
            isOpen={isOpenLogin}
            onClosed={()=>{
             //triggered on closing of login page
            }}
            onSuccess={(accessToken)=>{
             //triggered on successfull login
            }}/>

Props:

style --- Optional

All style properties allowed for a WebView

clientId

Client ID provided by Instagram Developer Console.

scopes

It must be of type Array and each entry must conatin valid permission name (list of all permissions is available in Instagram Developer Docs). e.g. ['public_content', 'follower_list']

redirectUrl

Must be the redirect URL registered in Instagram Developer Settings.

isOpen

Must be a Boolean type variable. Whenever you want to open login page, just make its value true.

onClosed--- Optional

Must be a function. This would be called once the Login Page is closed. Login page can be closed in 2 ways. User presses the back key or User is logged in successfully.

onSuccess

Must be a function. This would be called with a accessToken parameter once the Login is successfull.

Package Sidebar

Install

npm i rn-instagram-login

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

4.73 kB

Total Files

3

Last publish

Collaborators

  • rajatb94