flutter_facebook_login icon indicating copy to clipboard operation
flutter_facebook_login copied to clipboard

Cannot logout and re-login

Open premtemp1 opened this issue 7 years ago • 7 comments

How do I get the login screen again..

I execute the logout code but never get the login screen again,, Selecting the Facebook button always redirect to the confirmation screen .

I have a flutter app and I am testing on an IOS device

premtemp1 avatar May 02 '19 19:05 premtemp1

You should unbind facebook before login again, but after unbinding, there appear another error. Here is the code:

 FacebookAccessToken accessToken = await facebookLogin.currentAccessToken;
    String result = await HttpUtilFacebook.delete(
        "https://graph.facebook.com/me/permissions?access_token=${accessToken.token}");
    if (!result.contains("success")) {
       return;
    }

https://github.com/roughike/flutter_facebook_login/issues/123

windows7lake avatar May 14 '19 02:05 windows7lake

What is the status of this issue? I have also found that after logging out:

await facebookLogin.logOut();

...and then calling login again:

var result = await facebookLogin.logInWithReadPermissions(['email']);

...the login dialog does not appear, so there is no way to log in as a different Facebook user. Is the solution above by @windows7lake correct? (S/he says it leads to another error?) What is the right way to do this?

MichaelFerrier avatar May 22 '19 22:05 MichaelFerrier

Any solution for this @roughike @windows7lake i am facing the same issue

amitted avatar Oct 21 '19 09:10 amitted

@amitted You can try the way above,and make sure your fb Account useful. The account which I use in my app was frozen by FB because fb change their logo and we didn't upgrade.

windows7lake avatar Oct 22 '19 07:10 windows7lake

Hi, @windows7lake what is HttpUtilFacebook here which package you are using?

amitted avatar Oct 22 '19 08:10 amitted

@amitted HttpUtilFacebook is a net request class write by myself. You can use dio to do a delete request instead of HttpUtilFacebook.

windows7lake avatar Oct 23 '19 01:10 windows7lake

I too hit the bump on this. I'm not sure if the method above by @windows7lake will work. Printing currentAccessToken gives null, yet doesn't show the dialog for selecting account/s.

vipinnegi90 avatar Jul 23 '20 13:07 vipinnegi90