Speak with Jarvis assistant using Facebook Messenger app or facebook website.
You can use this plugin to communicate with Jarvis assistant with Facebook Messenger app or directly with facebook website.:
(English)
You: Send a facebook message to XXXX
Jarvis: Facebook message sent to XXXX
(French)
You: Envoi un message facebook à XXXX
Jarvis: Message facebook envoyé à XXXX
1) Create a Facebook account which will be used as "sender" for your Jarvis communications.
2) Add this facebook account as friend to your main facebook account (the one you daily use).
3) Add this plugin to your Jarvis assistant (more info here): ./jarvis.sh -p https://github.com/QuentinCG/jarvis-fb-messenger
(the installation may take up to 35 minutes).
4) Configure the configuration file to match your requirements: You need to specify your facebook Jarvis email address, password and some other options (don't specify user IDs yet).
5) Get Facebook IDs of people allowed to speak with Jarvis: Try to send a message from messenger to Jarvis (Jarvis must be launched): It will say that you don't have right to speak to him and will give you your ID.
6) Add those IDs in var_jv_pg_fb_allowed_people_ids
in the configuration file to allow people to communicate with Jarvis.
7) For more security once the plugin is working: Update the configuration file to set var_jv_pg_fb_getId
and var_jv_pg_fb_allow_control_to_all
to False
8) Enjoy
IMPORTANT NOTE:
Facebook will more than likely flag your account as "bot". To prevent it, you should log in with your jarvis facebook account using a web browser at the same IP (and same device if possible) in order for facebook to "register" that you are not a bot. To do so, you can for example use chromium as web browser (X server must be activated if you are on SSH):
sudo apt install chromium chromium-l10n
chromium
If you have difficulties making this plugin work, here are some advice:
sudo pip3 install fbchat --upgrade
commandvar_jv_pg_fb_allow_control_to_all
key in the configuration file to False
and try to communicate with Jarvis from your Web browser (Put it back to True
once you discovered from where the issue came from else everyone will be able to discuss with your Jarvis).jarvis -j -m -v "My question that is not working with FB here"
.This project is under MIT license. This means you can use it as you want (just don't delete the plugin header).
If you want to add more examples or improve the plugin, just create a pull request with proper commit message and right wrapping.