Comments (13)
In my experience, including __dyn
makes no difference.
from fbchat.
@actionless if you love reading minified code, feel free to log into FB, download the whole page and all JS and all, grep __dyn
and figure out how it's generated. From my two past attempts, that baby's hard to figure out (though @Schmavery and I have figured out all of the other "encryption schemes" happening). As @Schmavery said, it doesn't seem to make a difference so far (let's not jinx it)
from fbchat.
is markAsRead
works for anyone here?
or it's something wrong with my setup
from fbchat.
@Schmavery is it works in your js implementation btw?
from fbchat.
@actionless Did you also run "MarkAsSeen"? I'm not 100% sure on what the difference is, but there is one...
from fbchat.
just for the better understanding, the test code:
def print_new_messages(facebook_id, facebook_password):
client = fbchat.Client(facebook_id, facebook_password)
user_ids = client.getUnread()['unseen_threads'][0]['other_user_fbids']
if not user_ids:
print("No new messages")
return
for user_id in user_ids:
print("{}:".format(user_id))
for message in client.getThreadInfo(user_id, 0):
if message.is_unread:
print((message.subject, message.body))
client.markAsDelivered(user_id, message.message_id)
client.markAsRead(user_id)
client.markAsSeen()
test case to reproduce the issue:
- send a message to facebook account
- execute that code snippet, it should print the new message
- send one more message
- execute code snippet once again
expected result:
only the latest message was printed to the console
actual result:
both message from pt.1 and 3 are displayed (message.is_unread
remains True
)
but after opening in the browser and running code snippet once again those messages are marked as read so not displayed
from fbchat.
so can anyone confirm the issue?
from fbchat.
@actionless hey, looking at our implementation (from which this is based on), this is what we do. I difference is the form sent to change_read_status.php
contains a list of threadID
s instead of userID
s. Try calling it with a threadID
and see what happens.
from fbchat.
unfortunately it's still behave the same
from fbchat.
in order to work markAsRead, please fix
" data["ids[%s]"%userID] = True " => " data["ids[%s]"%userID] = 'true' "
this value mast be in lowercase.
from fbchat.
override
class Client(fbchat.Client):
def markAsRead(self, userID):
data = {"ids[%s]" % userID: 'true'}
r = self._post(fbchat.client.ReadStatusURL, data)
return r.ok
from fbchat.
@thnkloud9 if you are still working on the project, see above
from fbchat.
Assuming this has been fixed
from fbchat.
Related Issues (20)
- ValueError: too many values to unpack (expected 1)
- Could not find any ServerJSDefine HOT 1
- Found too many ServerJSDefine HOT 2
- Upload speed is very slow even with good internet
- File loading progress
- Can't listen() Error #1357005 HOT 3
- Login not work
- FBchatException solution HOT 1
- Could not find fb_dtsg
- Could not find any ServerJSDefine. Please report this, along with the data below HOT 1
- Note for others unable to login HOT 4
- Failed parsing MQTT data on /t_trace as JSON HOT 3
- Sending AudioAttachments doesn't work HOT 4
- Trouble Logging in Error and info included
- Can't Log in HOT 7
- Search contact by mobile phone number
- Module not found Error!
- Error when sending request: Got 500 response.
- Closed
- Screenshot (Mar 25, 2023 6:10:08 AM)
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 fbchat.