Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native React本机Facebook登录库(React本机fbsdk)-如何更改徽标?_React Native_React Native Fbsdk - Fatal编程技术网

React native React本机Facebook登录库(React本机fbsdk)-如何更改徽标?

React native React本机Facebook登录库(React本机fbsdk)-如何更改徽标?,react-native,react-native-fbsdk,React Native,React Native Fbsdk,我正在使用library react native fbsdk,一切正常。 然而,当用户点击按钮通过facebook登录时……屏幕上会显示“您想继续吗”……这会显示react原生徽标(atom)。有没有办法展示不同的标志?(最好是facebook的徽标) 代码如下 <SocialIcon title="Sign In With Facebook" button type="facebook"

我正在使用library react native fbsdk,一切正常。 然而,当用户点击按钮通过facebook登录时……屏幕上会显示“您想继续吗”……这会显示react原生徽标(atom)。有没有办法展示不同的标志?(最好是facebook的徽标)

代码如下

      <SocialIcon
        title="Sign In With Facebook"
        button
        type="facebook"
        onPress={() => {
          _facebookSignin();
        }}
      />


_facebookSignin = async () => {
  try {
    const result = await LoginManager.logInWithPermissions([
      'public_profile',
      'email',
    ]);

    if (result.isCancelled) {
      throw 'User cancelled the login process';
    }
    const data = await AccessToken.getCurrentAccessToken();

    if (!data) {
      throw 'Something went wrong obtaining access token';
    }

    const firebaseCredential = await auth.FacebookAuthProvider.credential(
      data.accessToken,
    );
    
    const fbUserObj = await auth().signInWithCredential(firebaseCredential);

  } catch (error) {
    if (error.code === 'auth/account-exists-with-different-credential') {
      Alert.alert('Email already registered');
    } else if (error.code === statusCodes.SIGN_IN_CANCELLED) {
      Alert.alert('Sign in cancelled');
    } else if (error.code === statusCodes.IN_PROGRESS) {
      Alert.alert('Sign in is already in progress');
    } else {
      Alert.alert('Issue creating account', error.message);
    }
  }
};
{
_facebookSignin();
}}
/>
_facebookSignin=async()=>{
试一试{
const result=等待LoginManager.logInWithPermissions([
"公众简介",,
“电子邮件”,
]);
如果(结果被取消){
抛出“用户已取消登录过程”;
}
const data=await AccessToken.getCurrentAccessToken();
如果(!数据){
抛出“获取访问令牌时出错”;
}
const firebaseCredential=等待auth.FacebookAuthProvider.credential(
data.accessToken,
);
const fbUserObj=wait auth().signInWithCredential(FireBaseCreddential);
}捕获(错误){
如果(error.code===“存在具有不同凭据的身份验证/帐户”){
Alert.Alert(“电子邮件已注册”);
}else if(error.code==statusCodes.SIGN\u IN\u CANCELLED){
警报。警报(“取消登录”);
}else if(error.code==statusCodes.IN\u PROGRESS){
Alert.Alert('登录已在进行');
}否则{
Alert.Alert('问题创建帐户',错误消息);
}
}
};

您可以将此徽标图像更改为您的Facebook开发者应用程序