Created
May 9, 2015 20:58
-
-
Save joostrijneveld/35d4b2f6532a5187d8a8 to your computer and use it in GitHub Desktop.
Facebook autoresponder plugin for Poezio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from plugin import BasePlugin | |
class Plugin(BasePlugin): | |
def init(self): | |
self.api.add_event_handler('conversation_msg', self.on_msg) | |
self.api.add_event_handler('private_msg', self.on_msg) | |
def on_msg(self, msg, tab): | |
tab.command_say('[Automatic response] I stopped reading Facebook chat. Do try in some other way!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a plugin for the Poezio XMPP client. As of writing, it still works with Facebook chat, although Facebook has deprecated this feature and announced that it would drop support on 2015-04-30. I recommend running it in
screen
on a server somewhere.git clone git://git.poez.io/poezio
cd poezio
./update.sh
poezio/plugins
asautoresponder.py
~/.config/poezio/poezio.cfg
jid = [email protected]
password = yourpassword
server = chat.facebook.com
plugins_autoload = autoresponder
./launch.sh
If you get
pyvenv' executable not found. Check that you have python (>= 3.4) installed, and that $POEZIO_VENV_COMMAND points to a valid virtualenv command.
,then try:
apt-get install python3-venv
.See https://www.facebook.com/help/usernames/general for information on Facebook usernames.