fork download
  1. from fbchat import Client
  2. from fbchat.models import *
  3.  
  4. class EchoBot(Client):
  5. def onMessage(self, message_object,
  6. author_id, thread_id,
  7. thread_type, **kwargs):
  8. if self.uid != author_id:
  9. self.send(
  10. Message(text="Heja!"),
  11. thread_id=thread_id,
  12. thread_type=thread_type
  13. )
  14.  
  15. client = EchoBot("<mail>", "<haslo>")
  16. client.listen()
Runtime error #stdin #stdout #stderr 0.02s 9376KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
ImportError: No module named 'fbchat'