Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login error:Sorry, something went wrong.We are working on it and we'll get it fixed as soon as we can.(Android) #128

Open
Walker57481 opened this issue Feb 16, 2023 · 1 comment

Comments

@Walker57481
Copy link

I use this plugin, it is valid before 2023/2/10, But after that, The FacebookLogin.login function cannot be used to log in correctly, The following is the result screen.

Screenshot_20230213-162557996 jpg

I tried on my cellphone and emulator,And get the same result, The following is smartphone information.

  • Device: [ZenFone 5Z (ZS620KL)]
  • OS: Android 10
    Emulator
  • Device: [Nexus 5X API31]
  • OS: Android 12.0 x86_64

Here is my code.
<template>
<button @click="login()">
<img src="../assets/images/fb_button.jpg"/>
</button>
<p>{{ token }}</p>
<p>{{ expiration_time }}</p>
<p>{{ expiresInt }}</p>
<p>{{ userID }}</p>
<p>{{ status }}</p>
<input type="button" value="logout" @click="logout()"/>
<input type="button" value="getProfile" @click="getProfile()" />
<p>{{ email }}</p>
</template>

<script>
import {
FacebookLogin
} from '@capacitor-community/facebook-login';

const FACEBOOK_PERMISSIONS = [
'email',
'user_birthday',
'user_photos',
'user_gender'
];

export default {
name: 'HelloWorld',
props: {
msg: String
},
data(){
return {
token: "token",
expiration_time: "expiration_time",
expiresInt: "expiresInt",
userID: "userID",
status: "status",
email: "email"
};
},
methods:{
async login(){
let that = this;
const result = await FacebookLogin.login({ permissions: FACEBOOK_PERMISSIONS })
if (result.accessToken) {
// Login successful.
that.token = result.accessToken.token;
that.expiration_time = result.accessToken.expires;
that.expiresInt = result.expiresIn;
that.userID = result.accessToken.userId;
that.status = "connected";
}
},
async logout(){
await FacebookLogin.logout();
},
async getProfile(){
let that = this;
let email ="";
let profile = await FacebookLogin.getProfile<{
email
}>({ fields: ['email'] });
that.email = profile.email;
}
}
}
</script>

Thanks to everyone who paid attention.

@co-dax
Copy link

co-dax commented Nov 20, 2023

I have fixed this by clearing mobile app cache and data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants