Coder Social home page Coder Social logo

Comments (13)

Schmavery avatar Schmavery commented on June 30, 2024

In my experience, including __dyn makes no difference.

from fbchat.

bsansouci avatar bsansouci commented on June 30, 2024

@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.

actionless avatar actionless commented on June 30, 2024

is markAsRead works for anyone here?
or it's something wrong with my setup

from fbchat.

actionless avatar actionless commented on June 30, 2024

@Schmavery is it works in your js implementation btw?

from fbchat.

PidgeyL avatar PidgeyL commented on June 30, 2024

@actionless Did you also run "MarkAsSeen"? I'm not 100% sure on what the difference is, but there is one...

from fbchat.

actionless avatar actionless commented on June 30, 2024

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:

  1. send a message to facebook account
  2. execute that code snippet, it should print the new message
  3. send one more message
  4. 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.

actionless avatar actionless commented on June 30, 2024

so can anyone confirm the issue?

from fbchat.

bsansouci avatar bsansouci commented on June 30, 2024

@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 threadIDs instead of userIDs. Try calling it with a threadID and see what happens.

from fbchat.

actionless avatar actionless commented on June 30, 2024

unfortunately it's still behave the same

from fbchat.

horik avatar horik commented on June 30, 2024

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.

horik avatar horik commented on June 30, 2024

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.

actionless avatar actionless commented on June 30, 2024

@thnkloud9 if you are still working on the project, see above

from fbchat.

madsmtm avatar madsmtm commented on June 30, 2024

Assuming this has been fixed

from fbchat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.