misonomikadev / messenger-api.js

A powerful Node.js module that allow you to interact with the Facebook API.
MIT License
37 stars 7 forks source link

How to get all chat list #8

Closed NightRannie closed 1 year ago

NightRannie commented 1 year ago

I am using this library on electron , facebook login success but the request of api is not pass

I want to get a list of all sessions of the logged-in user

I don't think it will work. Can you give me an example

thanks, I really need help

misonomikadev commented 1 year ago

You mean all the chat thread for a messenger account?

NightRannie commented 1 year ago

yeah,It doesn't work when I call getFriendsList

misonomikadev commented 1 year ago

You don't need to do that, you can get thread directly by get it from client, example client.threads.cache (sync), If you want to fetch (async) it then use client.threads.fetch()

NightRannie commented 1 year ago

okay, I know I logged in with email and password in my project to get AppState like fbstate.json Whether to use appstate to new Client

NightRannie commented 1 year ago

Because my project requirement requires email login, I must do so

misonomikadev commented 1 year ago

Because my project requirement requires email login, I must do so

We still working on login with email and password so this library can't login without fbstate.json (account cookie)

misonomikadev commented 1 year ago

Maybe v2 will have that thing :>

NightRannie commented 1 year ago

Is the account cookie copied from the facebook website? I have tried and succeeded before So I want to try adding email login to this library and applying it to my project

Allow any user to log in to my application

misonomikadev commented 1 year ago

yes, file fbstate.json is the cookie copied from facebook web.

NightRannie commented 1 year ago

thanks, understand