React Native Instagram login
a react native instagram login component (support android & ios). Pull requests are welcome!
IMPORTANT NOTES:
react-native-instagram-login
version 2 switches to the Instagram Graph API.
If you want to use old version 1, please read docs
Install
After that run:
for ios:
- How to get
appId
,appSecret
of instagram?
Simple setup, you only need to complete step 3.
Then go to Instagram> Basic Display> Instagram App ID field
This is going to give you an access_token, which one can be used on the new Graph Api, go to https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-profiles-and-media for docs.
Usage:
Props
Property | Type | Description |
---|---|---|
appId | PropTypes.string | Instagram App_id |
appSecret | PropTypes.string | Instagram App_secret |
responseType | PropTypes.string | 'code' or 'token', default 'token' |
scopes | PropTypes.array | Login Permissions |
redirectUrl | PropTypes.string | Your redirectUrl |
onLoginSuccess | PropTypes.func | Function will be call back on success |
onLoginFailure | PropTypes.func | Function will be call back on error |
onClose | PropTypes.func | Function will be call back on close modal |
modalVisible | PropTypes.bool | true or false |
renderClose | PropTypes.func | Render function for customize close button |
containerStyle | PropTypes.object | Customize container style |
wrapperStyle | PropTypes.object | Customize wrapper style |
closeStyle | PropTypes.object | Customize close style |
Logout
Currently the react-native-cookies library is not working, so we cannot delete cookies, so temporary the solution is to disable cookies on webview.
See more
~To logout use clear cookies by using https://github.com/joeferraro/react-native-cookies~