Giter Site home page Giter Site logo

Logout Problem about openfb HOT 7 OPEN

ccoenraets avatar ccoenraets commented on July 20, 2024
Logout Problem

from openfb.

Comments (7)

hutchic avatar hutchic commented on July 20, 2024

I think you need to deauth the application

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

from openfb.

nicowenterodt avatar nicowenterodt commented on July 20, 2024

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

from openfb.

pruimmartin avatar pruimmartin commented on July 20, 2024

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..

from openfb.

mixersoft avatar mixersoft commented on July 20, 2024

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');


from openfb.

mixersoft avatar mixersoft commented on July 20, 2024

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');


from openfb.

chrisschaub avatar chrisschaub commented on July 20, 2024

I can confirm that changing

tokenStore.removeItem('fbtoken'); 

to

tokenStore.removeItem('fbAccessToken');

fixes the logout issue.

from openfb.

nagubabu avatar nagubabu commented on July 20, 2024

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

from openfb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.