小编VjL*_*xmi的帖子

无效的 Redirect_uri 用于使用 react native 登录 instagram

我正在使用react-native-instagram-loginReact Native。

这是我的代码

<InstagramLogin
  ref={instagramLoginRef}
  appId='***********'
  appSecret='*******************'
  scopes={['user_profile', 'user_media']}
  onLoginSuccess={(data) => console.log("Success")}
  onLoginFailure={(data) => console.log("Fail " +  JSON.stringify(data))}
/>
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

{"error_type": "OAuthException", "code": 400, "error_message": "Invalid redirect_uri"}
Run Code Online (Sandbox Code Playgroud)

在 Instagram 开发者控制台中,我应该添加什么作为重定向 Uri,因为这不是网站,而是本机应用程序。

react-native react-native-instagram-login

8
推荐指数
1
解决办法
7849
查看次数

在嵌套的功能组件 React Native 中键入 TextInput 时键盘关闭

我有一个奇怪的问题,当 TextInput 放置在子功能组件中时,键盘在打字时一直关闭。如果 TextInput 直接放在父组件下,则不存在此问题。这是我的代码

const SignInScreenC = props => {

// define Hook states here    
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [isEmailEmpty,setIsEmailEmpty] = useState(false);
const [isEmailValid,setIsEmailValid] = useState(true);
const [isPasswordEmpty,setIsPasswordEmpty] = useState(false);


/**
 * Called when Sign in is clicked.
 * checks if the form is valid
 */
 const _OnSignInClicked = () => {
   if(_isFormValid()) {
    //make api call
   }
 }

/* Checks if the form is valid
*/
const _isFormValid = () => …
Run Code Online (Sandbox Code Playgroud)

forms nested reactjs react-native react-native-textinput

4
推荐指数
1
解决办法
1828
查看次数