GithubHelp home page GithubHelp logo

texting_app's Introduction

Texting apps Build an app that lets users send text messages to their friends.

As a user, I want to send a text message to a phone number, so that I can send texts from the web. Hint: Follow along with the lesson. As a user, I want to save contacts to an address book, so that it’s easy to text them again without re-typing their phone number. As a user, I want to send a message to more than one person at once, so that I can mass text my friends. As a user, I want to send pictures in my messages, so that I can share photos and cute cat pics with my friends. Hint: Check the Twilio API docs. As a user who receives a text message, if I text back, I want to get an automated response telling me that the phone number can’t receive texts, so that I don’t get sad when the sender doesn’t reply. Hint: This will be a bit hard, and I don’t expect you to necessarily finish this. Here are some pointers: When Twilio receives a text message to one of your phone numbers, it will make callback, or webhook, which just means an HTTP request from the API to your server. On Heroku, this is easy, but to work on your development machine, you’ll need a “tunnel” that Twilio can reach your computer through. One nice, free option is localtunnel.me. Set that up first.

On your Twilio numbers page, choose your phone number, then change the messaging request URL to your localtunnel address followed by an endpoint that Twilio can POST to when it receives a test, e.g. j384.localtunnel.me/inbound_messages.

Create a route and controller for creating inbound messages. Make a PORO model that can take a phone number and text the automated response back to it. When the inbound text is received, it will take the request, pass the phone number of the sender to the model, and the model then sends the automated response back.

When writing integration tests, you can simulate Twilio’s request to your app by doing something like this:

describe “inbound text message” do

it "does something..." do
  RestClient.post #make a request to your app as if you were Twilio
end

end If you have trouble receiving callbacksfrom Twilio, make sure to check out the Twilio logs.

Phew!

As a user who receives a text message, if I text back, I want my message to be delivered to everyone else in my group. Hint: Buy a unique phone number for each group that is created, so that you can associate messages sent and received at that number with a particular group.

texting_app's People

Contributors

hoghug avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.