QuentinCG / jarvis-fb-messenger

[Done] Control Jarvis assistant (http://openjarvis.com/) remotely using Facebook Messenger
MIT License
4 stars 2 forks source link

Plugin don't start #7

Closed SebNania closed 7 years ago

SebNania commented 7 years ago

Hello, Thank you very much for this plugin, i use it since some weeks without issue. but since today, plugin seams to don't login on Facebook (time since last login for other account don't move when I start Jarvis). I've try to uninstall et install it again without change. I've try to send a message using the python script "fb_messenger_send.py" but it does not work (I use a copy/past of a request that I use in a script to send some information to my FB account usually) : python3 fb_messenger_send.py --email JARVISACCOUNT@ADRESSE.HERE --password MYPASSWORSHERE --receiver MYPERSONNALUSERIDHERE --message "Message to send" It give (I think) the html code of the Facebook page and finish by some errors :

Traceback (most recent call last): File "fb_messenger_send.py", line 142, in main() File "fb_messenger_send.py", line 134, in main return_value = sendWithFacebookMessenger(email_address=_email, password=_password, receiver_id=_receiver, message=_message, image_path=_image, debug=True) File "fb_messenger_send.py", line 35, in sendWithFacebookMessenger client = fbchat.Client(email_address, password, debug, user_agent=None) File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 118, in init self.login(email, password, max_retries) File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 328, in login if not self._login(): File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 233, in _login self._post_login() File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 190, in _post_login self.payloadDefault['__rev'] = int(r.text.split('"revision":',1)[1].split(",",1)[0]) IndexError: list index out of range

Is the plugin work for you? (it's possible that Facebook have make change that block the script) What do you think I could do to make it work again?

thanks in advance

Sebastien

SebNania commented 7 years ago

Sur le moment j'ai pas réfléchi que tu es français ^^Désolé pour le pavé en anglais du coup

QuentinCG commented 7 years ago

Hey @SebNania,

Sorry for the late answer.... (I didn't see your comment/issue....) Facebook doesn't have a "real API" (this is strange but that's why it may break sometimes...). I improved "install.sh" file in order to be used to upgrate the plugin too.

In order to make it work again, you have to update jarvis-fb-messenger plugin when it doesn't work (or do a sudo pip3 install fbchat --upgrade).

Please tell me if this fixed your problem (it should). Cheers

SebNania commented 7 years ago

Thanks for your help, I've do that but Facebook have lock my domotic account, I wait for the unlock before I can try again

QuentinCG commented 7 years ago

Thanks for your help, I've do that but Facebook have lock my domotic account, I wait for the unlock before I can try again

Yep, it seems Facebook doesn't like those kind of 'bot accounts' :( (I got one "locked" too... I had to add an image of me to unlock it).

Good luck.