Skip to content

Instantly share code, notes, and snippets.

@ltfschoen
Created April 30, 2017 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltfschoen/c4b4cb56cb6d547992d7ff181982141d to your computer and use it in GitHub Desktop.
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
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