Comments (8)
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.
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.
@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.
@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.
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.
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.
@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.
Reopening so that we don't forget to fix this in listen.
from facebook-chat-api.
Related Issues (20)
- chrome extension HOT 1
- How to change Group Thread Name? HOT 1
- Cannot receive "message" from api.listenMQTT when trying to change userAgent HOT 2
- sendMessage can't use param url HOT 1
- api.getThreadList doesn't return page and user url
- Cannot read property 'name' of undefined
- Error 1357005 when setTitle
- how to listen to Message Requests from non-friend accounts? HOT 1
- Rate limit? HOT 1
- esockettimedout HOT 1
- fix login erorr HOT 9
- api.sendMessage is not working now err: 1357005 HOT 2
- The attachment could not be found. HOT 1
- Unexpected token < in JSON at position 0 HOT 11
- Error when use api.listenMQTT (SyntaxError: Unexpected token ↓ in JSON at position 0) HOT 1
- Parse error when use avatar sticker
- Unhandled rejection TypeError: Cannot read properties of undefined (reading 'messageCount') HOT 1
- how do I make the bot wait for a reply HOT 2
- Recieve messages HOT 1
- Issue with Login: Error retrieving userID HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-chat-api.