Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created February 16, 2014 12:29
Show Gist options
  • Save RobSpectre/9033516 to your computer and use it in GitHub Desktop.
Save RobSpectre/9033516 to your computer and use it in GitHub Desktop.
Example of receiving an SMS.
from flask import Flask
from flask import request
from twilio import twiml
# Declare and configure application
app = Flask(__name__)
@app.route('/sms', methods=['POST'])
def sms():
body = request.form['Body']
from_number = request.form['From']
# Where you put the Facebook code....
# End Facebook code.
response = twiml.Response()
response.message('Your comment was saved.')
return str(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment