Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/messenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def messenger_post():
# We retrieve the Facebook user ID of the sender
fb_id = message['sender']['id']
# We retrieve the message content
text = message['message']['text']
if 'text' in message['message']:
text = message['message']['text']
else:
text = ''
# Let's forward the message to the Wit.ai Bot Engine
# We handle the response in the function send()
client.run_actions(session_id=fb_id, message=text)
Expand Down