Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login with messenger.com directly #413

Closed
ljskatt opened this issue Apr 4, 2019 · 4 comments
Closed

Login with messenger.com directly #413

ljskatt opened this issue Apr 4, 2019 · 4 comments

Comments

@ljskatt
Copy link

ljskatt commented Apr 4, 2019

Backstory

Im using facebook, but i have deactivated it beacause i dont see the use of facebook (Messenger is still something i use), and i dont want facebook to store all of my data (privacy in mind)
Now i want to delete my facebook, but messenger will then also be deleted if i do that.
So i made a new Facebook messenger account (Not linked to the Main facebook) and convert over to that. So i wanted to make a bot to message people on the facebook account to add me on the new messenger account (When they send a message, they will get a predefined message in return)

Description

The problem im having, is that the bot is activating my facebook every time i start the bot.
Checked the source of the module, and i found out it was beacuse it was using m.facebook.com to login to faceboook.

If i start the bot and then deactivates the facebook account, the bot gets an error that says that it needs to login again.

Request

So my request is to make the login to use messenger.com as a way to log in, so that my account will stay deactivated.

@madsmtm
Copy link
Member

madsmtm commented Apr 17, 2019

For my own future reference, this is related to #403.

I can tell that this is annoying, and of course it should be possible, but I can't immediately see how. The reason we're logging in via. m.facebook.com is mostly because it's Javascript free, which makes the process a lot easier code-wise. I've tried in the past to change this, but the login process is just infinitely devious to get right, especially since it's rate-limited, and laden with security checks.

If you're daring, you can try tinkering with it yourself by changing the urls in fbchat._util.ReqUrl from *.facebook.com to *.messenger.com, and see what works, and what doesn't, but I can't really help you any further than that 😕. If you do find a way to login, even if just by loading stored cookies, I'd love to know!

@madsmtm
Copy link
Member

madsmtm commented May 7, 2020

So, had to redo our login implementation, and at that point I thought, might as well fix this issue, so I did, see 079d409. Will release this as part of an alpha release later, have to test it with a Messenger-only account first tho.

@madsmtm
Copy link
Member

madsmtm commented May 7, 2020

Okay, didn't get the chance to test it, so please do!

I might backport this to v1, for now, it's released in v2.0.0a3.

@madsmtm madsmtm closed this as completed May 7, 2020
@wetmore
Copy link

wetmore commented May 16, 2020

I can't login using this version of fbchat. I get the following error:

Traceback (most recent call last):
  File "hello.py", line 4, in <module>
    session = fbchat.Session.login("<username snipped>", "<password snipped>")
  File "/Users/matt/programming/python/patrick2/venv/lib/python3.7/site-packages/fbchat/_session.py", line 290, in login
    raise _exception.NotLoggedIn(error)
fbchat.NotLoggedIn: Password Forgot account?

If I use 2.0.0a2 or 1.9.6 I can log in with no issue. Comparing the code in these versions vs 2.0.0a3 the main difference I noticed was the use of messenger.com instead of m.facebook.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants