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

Logout Problem #52

Open
pfdundar opened this issue Jan 31, 2015 · 7 comments
Open

Logout Problem #52

pfdundar opened this issue Jan 31, 2015 · 7 comments

Comments

@pfdundar
Copy link

Hello,
I use cordova/phonegap, when I logout from facebook, token becomes null, there is no problem here. However, It doesnt ask me facebook password or email when I click the login button again.
So It doesnt allow me login different users.
I think I can logout from app but cannot logout from inapp browser.
How can I solve this problem?

@hutchic
Copy link

hutchic commented Mar 5, 2015

I think you need to deauth the application

Through the native js api it would be
FB.api("/me/permissions", "delete", function(response){});

@nicowenterodt
Copy link

For that you could use the revokePermissions method which encapsulates the native api call @hutchic mentioned.

Back to topic: I got the same issue with that. I guess its because when you run it as an hybrid app on your phone there might be a problem with the redirect-url as the app does run within the filesystem and not under some domain.

@ccoenraets mentioned this as a comment above the logout method.

* IMPORTANT: For the Facebook logout to work, 
the logoutRedirectURL must be on the domain 
specified in "Site URL" in your Facebook App Settings

Maybe related with #35 and #10

Actually the following seemed to solve the problem. But I did not fully test everything by now.

https://github.com/vielhuber/OpenFB/commit/6cff3852e4a04b377eb4f654265a2ba1431bd316

@pruimmartin
Copy link

the ,clearcache=yes fixed the logout problem for me. I only added it to the logout function and i removed the settimeout function because it's not needed for me..

@mixersoft
Copy link

I beleive the problem is a BUG, the tokenStore key is incorrect, it should be tokenStore.removeItem('fbAccessToken');

// openfb.js
var logoutWindow,
            token = tokenStore.fbAccessToken;

        /* Remove token. Will fail silently if does not exist */
        tokenStore.removeItem('fbtoken');  // change to tokenStore.removeItem('fbAccessToken');


1 similar comment
@mixersoft
Copy link

I beleive the problem is a BUG, the tokenStore key is incorrect, it should be tokenStore.removeItem('fbAccessToken');

// openfb.js
var logoutWindow,
            token = tokenStore.fbAccessToken;

        /* Remove token. Will fail silently if does not exist */
        tokenStore.removeItem('fbtoken');  // change to tokenStore.removeItem('fbAccessToken');


@chrisschaub
Copy link

I can confirm that changing

tokenStore.removeItem('fbtoken'); 

to

tokenStore.removeItem('fbAccessToken');

fixes the logout issue.

@nagubabu
Copy link

Yes, after changing it to -> tokenStore.removeItem('fbAccessToken') the issue has been fixed. Thanks

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

7 participants