MinhHuyDev / fbchat-v2

About Facebook Chat (Messenger) for Python
https://mhuyz.dev
Apache License 2.0
38 stars 16 forks source link

Where is setCookies = "<cookies get from Facebook>" #7

Closed nongvantinh closed 9 months ago

nongvantinh commented 11 months ago

In the provided example, there is a variable setCookies initialized with the value "". I'm wondering where I can obtain these cookies. Is there any code implementation available for this purpose?

MinhHuyDev commented 11 months ago

Bạn có thể lấy qua việc truy cập vào Facebook đã đăng nhập sẵn sau đó nhấn F12 để mở phần DevTools của trình duyệt. Chọn 1 requests bất kì của Facebook (KHÔNG NÊN CHỌN REQUESTS LÀ ẢNH) ở phần Headers của Requests bạn sẽ thấy Cookies (Nếu không thấy hãy chọn 1 requests khác)

nongvantinh commented 11 months ago

Thanks. You did great work. Do you intend to implement the send_typing to the target?

MinhHuyDev commented 11 months ago

ý của bạn là có thể chọn gửi đến threading, user hoặc fanpage ?

nongvantinh commented 11 months ago

No, usually, when a user composes a message before sending, there is an ellipsis (...) that appears in the message thread to indicate that they are writing the message. It would be nice if this library contained that functionality.

MinhHuyDev commented 11 months ago

À, tôi hiểu. Tính năng này sẽ làm đi việc gửi tin nhắn chậm hơn so với bình thường (delay)