我正在使用react-native-instagram-login在react native中进行instagram集成。我已经尝试过,但是当我登录instagram时它给了我这个错误
{"error_type": "OAuthException", "code": 400, "error_message": "Invalid redirect_uri"}
这是我的代码
<TouchableOpacity onPress={() => this.instagramLogin.show()}>
<Text style={{color: 'black', textAlign: 'center'}}>Login now</Text>
</TouchableOpacity>
<InstagramLogin
ref={(ref) => (this.instagramLogin = ref)}
appId="*******"
appSecret="**********"
redirectUrl="https://www.google.com"
scopes={['user_profile', 'user_media']}
onLoginSuccess={(data) => console.log('check data ', data)}
onLoginFailure={(data) => console.log(data)}
/>
在开发人员Facebook中,我放置了有效的OAuth重定向URI- https://www.google.com
这很简单,您必须在重定向URL上添加斜线。
<TouchableOpacity onPress={() => this.instagramLogin.show()}>
<Text style={{color: 'black', textAlign: 'center'}}>Login now</Text>
</TouchableOpacity>
<InstagramLogin
ref={(ref) => (this.instagramLogin = ref)}
appId="*******"
appSecret="**********"
redirectUrl="https://www.google.com/"
scopes={['user_profile', 'user_media']}
onLoginSuccess={(data) => console.log('check data ', data)}
onLoginFailure={(data) => console.log(data)}
/>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句