We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have modify the receive message part, so it can send message after message is received:
def fb_receive_message(): message_entries = json.loads(request.data.decode('utf8'))['entry'] for entry in message_entries: for message in entry['messaging']: if message.get('message'): print("{sender[id]} says {message[text]}".format(**message)) client = Messager("Access code of page") recipient_id = message['recipient']['id'] client.send_text(recipient_id, "Hello, I'm enginebai.") return "Hi"
The access token is generated according to the tutorial image: https://cdn-images-1.medium.com/max/1600/1*op5S9F_-vsBv7FLrd4mv1g.png
In message.py line 219 req show http 400 error
The text was updated successfully, but these errors were encountered:
I figure it out myself: Change recipient_id = message['recipient']['id'] to recipient_id = message['sender']['id']
In message.py, URL_BASE = "https://graph.facebook.com/v2.9/me/" make sure all the post_url is not 404
Sorry, something went wrong.
I reopen this because I think the author may want to modify the sender example and message.py
No branches or pull requests
I have modify the receive message part, so it can send message after message is received:
def fb_receive_message():
message_entries = json.loads(request.data.decode('utf8'))['entry']
for entry in message_entries:
for message in entry['messaging']:
if message.get('message'):
print("{sender[id]} says {message[text]}".format(**message))
client = Messager("Access code of page")
recipient_id = message['recipient']['id']
client.send_text(recipient_id, "Hello, I'm enginebai.")
return "Hi"
The access token is generated according to the tutorial image: https://cdn-images-1.medium.com/max/1600/1*op5S9F_-vsBv7FLrd4mv1g.png
In message.py line 219 req show http 400 error
The text was updated successfully, but these errors were encountered: