Skip to content

Instantly share code, notes, and snippets.

View hunnycode's full-sized avatar

joohoun song hunnycode

View GitHub Profile
// twilio-node sample code "One-ring Call"
var twilio = require('twilio');
var client = twilio('1234567890', '0987654321');
client.calls.create({
to: '+81xxxxxxxxxx',
from: '+81zzzzzzzzzz',
url: 'http://twilio-sample.com'
}, function (err, call) {
if(err) {
console.log(err);
require 'koala' # gem install koala --no-document
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "read_mailbox" when authenticating
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxx'
graph = Koala::Facebook::API.new(oauth_access_token)
# get all latest messages
limit = 10
@hunnycode
hunnycode / server.rb
Created February 13, 2014 07:13 — forked from bouzuya/server.rb
require 'sinatra'
require 'twilio-ruby'
get '/' do
<<-HTML
<!DOCTYPE html>
<meta charset="utf-8">
<title>Twilio API</title>
<ul>
<li><a href="/sample">/sample</a></li>
import webapp2
from twilio import twiml
from twilio.rest import TwilioRestClient
class SendSMS(webapp2.RequestHandler):
def get(self):
# replace with your credentials from: https://www.twilio.com/user/account
account_sid = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
auth_token = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
client = TwilioRestClient(account_sid, auth_token)
@hunnycode
hunnycode / README.md
Created February 14, 2013 04:21 — forked from TMcManus/README.md

The python port of libphonenumber is pretty complete, but is a little short on examples and sample code. Here are some simple examples for some common uses of this fantastic library.