使用 Facebook 登录不会重定向到 iOS 上的应用程序,而是显示空白页面。世博会,脸书,
Sign in with facebook does not redirect to app on iOS, instead display blank page. Expo, Facebook,
问题出现前一切正常。现在,无需触摸任何内容,使用 Facebook 登录不再适用于 iOS,并且不会重定向回应用程序,而是显示空白页面。
尝试从 Facebook 应用卸载并签名 out/in。在 android.
照常工作
世博会版本:3.17.18
Facebook:expo-facebook @8.0.0
物理 ios 设备卡在的屏幕:
import * as Facebook from 'expo-facebook';
Facebook.initializeAsync("XXXXXXXXXXXXXX", "APP")
// appId from Facebook Developer Console; const appId = XXXXXXXXXXXXXX
const appId = 'XXXXXXXXXXXXXX'
// Permissions required, consult Facebook docs
const permissions = ['public_profile', 'email'];
const {
type,
token,
} = await Facebook.logInWithReadPermissionsAsync(
appId,
{permissions}
);
switch (type) {
case 'success': {
// Set persistent auth state
await firebase.auth().setPersistence(firebase.auth.Auth.Persistence.NONE);
const credential = firebase.auth.FacebookAuthProvider.credential(token);
// Sign in with Facebook credential
const facebookProfileData = await firebase.auth().signInWithCredential(credential);
// Do something with Facebook profile data
console.log(facebookProfileData)
// OR you have subscribed to auth state change, authStateChange handler will process the profile data
return Promise.resolve({type: 'success'}).then(navigateNext);
}
case 'cancel': {
return Promise.reject({type: 'cancel'});
}
}
在 Facebook 上转到:
设置 > 下载您的信息 > 创建文件
下载该文件以某种方式修复了死机白屏问题。
问题出现前一切正常。现在,无需触摸任何内容,使用 Facebook 登录不再适用于 iOS,并且不会重定向回应用程序,而是显示空白页面。
尝试从 Facebook 应用卸载并签名 out/in。在 android.
照常工作世博会版本:3.17.18 Facebook:expo-facebook @8.0.0
物理 ios 设备卡在的屏幕:
import * as Facebook from 'expo-facebook';
Facebook.initializeAsync("XXXXXXXXXXXXXX", "APP")
// appId from Facebook Developer Console; const appId = XXXXXXXXXXXXXX
const appId = 'XXXXXXXXXXXXXX'
// Permissions required, consult Facebook docs
const permissions = ['public_profile', 'email'];
const {
type,
token,
} = await Facebook.logInWithReadPermissionsAsync(
appId,
{permissions}
);
switch (type) {
case 'success': {
// Set persistent auth state
await firebase.auth().setPersistence(firebase.auth.Auth.Persistence.NONE);
const credential = firebase.auth.FacebookAuthProvider.credential(token);
// Sign in with Facebook credential
const facebookProfileData = await firebase.auth().signInWithCredential(credential);
// Do something with Facebook profile data
console.log(facebookProfileData)
// OR you have subscribed to auth state change, authStateChange handler will process the profile data
return Promise.resolve({type: 'success'}).then(navigateNext);
}
case 'cancel': {
return Promise.reject({type: 'cancel'});
}
}
在 Facebook 上转到:
设置 > 下载您的信息 > 创建文件
下载该文件以某种方式修复了死机白屏问题。