Created
April 30, 2017 06:24
-
-
Save ltfschoen/c4b4cb56cb6d547992d7ff181982141d to your computer and use it in GitHub Desktop.
# Apollo-bot snippet of Python code showing how Bot server may reply to user with text message
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
def reply(user_id, msg): | |
resp = requests.post("https://graph.facebook.com/v2.6/me/messages", | |
params={"access_token": fb_AT}, | |
data=json.dumps({ | |
"recipient": {"id": user_id}, | |
"message": {"text": msg} | |
}), | |
headers={'Content-type': 'application/json'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment