Giter Site home page Giter Site logo

Logout about facebook-chat-api HOT 8 CLOSED

schmavery avatar schmavery commented on June 6, 2024
Logout

from facebook-chat-api.

Comments (8)

Schmavery avatar Schmavery commented on June 6, 2024

I agree that we should have this feature. If you give us a couple days, we can probably find the time to look at it a little more closely. We'll have to check exactly what information is being sent in the form before we can know how to emulate it.

from facebook-chat-api.

senhly avatar senhly commented on June 6, 2024

Cool ! now we can logout. :D
:(
but the request after logout, facebook will ask for login to continue and next request will response html document so it cause error in parseResponse. any idea?

from facebook-chat-api.

Schmavery avatar Schmavery commented on June 6, 2024

@bsansouci now that you made the change that all errors throw exceptions, can we simply throw an error "User Not Logged In" or something in parseResponse?

from facebook-chat-api.

bsansouci avatar bsansouci commented on June 6, 2024

@senhly what function does the request after you've logged out?

@Schmavery though it would make sense in this case, I don't think it's a good error message. parseReponse makes the assumption that it receives JSON and it gets html, which can be caused by many things.
We should be catching any error that parseResponse throws and calling the callback with it, so if you logout and do something you'll get an error. That seems about right to me.

from facebook-chat-api.

Schmavery avatar Schmavery commented on June 6, 2024

I think @senhly is talking about using other API functionality after logging out. This should definitely cause an error, but it would be nice if it was a specific error and not just a parse problem. I was assuming we would do some basic parsing of the html in parseResponse to verify that this was actually the problem.

from facebook-chat-api.

bsansouci avatar bsansouci commented on June 6, 2024

Mmh Ok, maybe we could make another parseResponse that will throw an error {error: "Not logged in."} that we use everywhere where we are supposed to be logged in. The only place where we'd use the regular parseReponse is during the login process I'm guessing.

from facebook-chat-api.

senhly avatar senhly commented on June 6, 2024

@Schmavery was right, it cause error when call other function after logging out. By this way, I also notice that after logging out complete the pulling request in function listen still running. We could stop listen after log out. Am I right?

from facebook-chat-api.

Schmavery avatar Schmavery commented on June 6, 2024

Reopening so that we don't forget to fix this in listen.

from facebook-chat-api.

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.