chatplug / libfb-js Goto Github PK
View Code? Open in Web Editor NEWMessenger's MQTT implementation
License: GNU General Public License v2.0
Messenger's MQTT implementation
License: GNU General Public License v2.0
Is it possible to add reactions as a field for the Message object? Not sure what this would entail, but seems like an important feature of any Facebook Messenger message!
Hello, i am using libfb 2.3.5 and having this issue when sending a message to messenger :
DEBUG 18:40:09 messenger › sendMessage › Sending Messenger message
TRACE 18:40:09 messenger › sendMessage › sent message info {
TRACE 18:40:09 messenger › sendMessage › sent message info msgid: 1650279543,
TRACE 18:40:09 messenger › sendMessage › sent message info succeeded: false,
TRACE 18:40:09 messenger › sendMessage › sent message info errno: 1545075,
TRACE 18:40:09 messenger › sendMessage › sent message info errStr: 'This app version no longer supports messaging. To continue to send and receive messages, please update your app to a newer version or use the mobile web version of Facebook.',
TRACE 18:40:09 messenger › sendMessage › sent message info isRetryable: false
TRACE 18:40:09 messenger › sendMessage › sent message info }
I think that facebook updated something on their side, do we need to change something in the user agent ?
Thanks in advance,
In my local PoGo group we have 2 seperate raid messengers, therefore we also have 2 seperate discord channels. I got the first discord channel connected to its appropriate messenger, but when I try to connect the second discord/messenger, I get prompted with this error:
Cannot read property 'customization_info' of undefined
TypeError: Cannot read property 'customization_info' of undefined
at FacebookApi.constructor.parseThread.thread [as parseThread] (C:\snapshot\miscord\node_modules\libfb\dist\FacebookApi.js:50:43)
at FacebookApi.<anonymous> (C:\snapshot\miscord\node_modules\libfb\dist\FacebookApi.js:44:25)
at Generator.next (<anonymous>)
at fulfilled (C:\snapshot\miscord\node_modules\tslib\tslib.js:104:62)
at process._tickCallback (internal/process/next_tick.js:68:7)
When I link the discord it says its successfull, it is only when I try to link the messenger I get this error.
After I get the error, the bot shuts down and I have to restart it.
Message, EventTypes, FacebookApi and others should be exported, as it will provide typings for typescript users
Related to miscord/miscord#295
1.0.0: Basic API
1.1.0:
1.2.0:
Related: miscord/miscord#368
I am rather new to NodeJS, so forgive me for any basic errors.
That said, I've been trying to see if a thrown error is of type AttachmentNotFoundError
. However, I don't think this error type is actually exported anywhere, and thus any attempt to use instanceof AttachmentNotFoundError
results in TypeError: Right-hand side of 'instanceof' is not an object
or ReferenceError: AttachmentNotFoundError is not defined
.
Is there any way I can import this from src/types/errors
? Thanks!
if for some reason (internet connection down etc.) the connection fails there are no attempts to reconnect.
Related to miscord/miscord#431
document our shitty messy reverse engineered code
Related to this issue from Miscord - noting here as it seems to be handled within this codebase.
Lightspeed clients - iOS per the linked issue as well as facebook.com/messenger desktop browser site on my side at the least - appear to add some randomized gibberish in front of message data, causing message parsing to fail:
Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�{"deltas":[{"deltaNewMessage":{"messageMetadata":{"threadKey":{"threadFbId":1503335003032641},"messageId":"mid.$gAAVXRnTVjEF_V0jSTF5JgOIPszg1","offlineThreadingId":6794103221279471669,"actorFbId":1636270833,"timestamp":1619840436812,"shouldBuzzDevice":true,"tags":["source:chat:light_speed","app_id:2220391788200892"],"threadReadStateEffect":2,"skipBumpThread":false,"cid":{"conversationFbid":1503335003032641}},"body":"test","attachments":[]}}],"firstDeltaSeqId":265093,"lastIssuedSeqId":265093,"queueEntityId":100034260730370} Error while parsing the following message: (�9hjaimLxSMet4EwK36vf9A�
This seems to be randomized such that it does not always insert problematic characters, as it does work fine more often than not in my experience.
Suggestion for a fix:
It seems that the actual data after after the gibberish string consistently starts with {"deltas":
- as such I wonder if cutting out everything before {"deltas":
would resolve the issue. In my head this would be something like:
ms = ((ms.indexOf('{"deltas"') > 0) ? ms.substr(ms.indexOf('{"deltas"')) : ms)
right above here https://github.com/ChatPlug/libfb-js/blob/master/src/Client.ts#L312
Will test myself if I get a chance
I am not sure if this is a place to ask this question.
The library works perfect in my local system but when I deploy it to Heroku I cannot get it to work. After the deployment, I have to verify my account on Facebook. I know that Heroku servers from Austin, USA
are causing this problem (Location difference) but I was looking for something to bypass/workaround for this.
Has anyone faced this issue? And did anyone solved it?
Some help, please :)
EDIT: apparently it's not out for all users, so we would have to check if it's available
Hi, do you plan do add support for handling the typing indicator?
That would come in really, really handy.
Returned by sendMessage, all the time beginning from the login.
Sorry, messages are temporarily unavailable. Please try again in a few minutes.
Code:
try {
let client = new Client();
client.login(req.body.email, req.body.password).then(() => {
req.session.session = client.getSession();
res.send('Logged in.');
});
} catch (e) {
res.send(e);
}
Error:
(node:3248) UnhandledPromiseRejectionWarning: Error: User must verify their account on www.facebook.com (405)
at post.then.res (node_modules\libfb\dist\http\HttpApi.js:26:35)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:3248) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3248) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.