Deploy Your Facebook App on Heroku
There’s a cool tutorial to create your own Facebook app, running on Heroku and just five miniutes to pay your attention in here: Getting Start With Your App Facebook On Heroku.
After following that simple tutorial, I’ve just created my own facebook app successfully. And here is my notes.
$ heroku login
Enter your Heroku credentials.
Email: oplabao_user@gmail.com
Password (typing will be hidden):
Could not find an existing public key.
Would you like to generate one? [Yn] Y
Generating new SSH public key.
Uploading SSH public key /home/rrrubbby/.ssh/id_rsa.pub… done
Authentication successful.
$ git clone git@heroku.com:oplabao.git
Initialized empty Git repository in /home/rrrubbby/Code/Ruby/oplabao/oplabao/.git/
remote: Counting objects: 156, done.
remote: Compressing objects: 100% (138/138), done.
remote: Total 156 (delta 67), reused 0 (delta 0)
Receiving objects: 100% (156/156), 123.79 KiB | 91 KiB/s, done.
Resolving deltas: 100% (67/67), done.
Go to your app location.
$ cd oplabao
$ git status
We will edit something like to change the body’s background-color to black. So
$ vi views/index.erb
$ git status
# On branch master
# Changed but not updated:
# (use “git add <file>…” to update what will be committed)
# (use “git checkout — <file>…” to discard changes in working directory)
#
# modified: views/index.erb
#
no changes added to commit (use “git add” and/or “git commit -a”)
$ git add .
$ git status
# On branch master
# Changes to be committed:
# (use “git reset HEAD <file>…” to unstage)
#
# modified: views/index.erb
#
$ git commit -m ‘change background’
[master 1706051] change background
1 files changed, 2 insertions(+), 2 deletions(-)
$ git remote add heroku git@heroku.com:oplabao.git
$ git push heroku
Warning: Permanently added the RSA host key for IP address ‘50.19.85.156’ to the list of known hosts.
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 367 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
—–> Heroku receiving push
—–> Ruby/Rack app detected
—–> Installing dependencies using Bundler version 1.2.0.pre
Running: bundle install –without development:test –path vendor/bundle –binstubs bin/ –deployment
Using addressable (2.2.7)
Using crack (0.1.8)
Using daemons (1.1.3)
Using eventmachine (0.12.10)
Using multipart-post (1.1.5)
Using rack (1.3.2)
Using faraday (0.7.6)
Using httparty (0.7.8)
Using json (1.5.4)
Using multi_json (1.0.3)
Using koala (1.3.0)
Using tilt (1.3.3)
Using sinatra (1.2.6)
Using thin (1.2.11)
Using bundler (1.2.0.pre)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
—–> Discovering process types
Procfile declares types -> web
Default types for Ruby/Rack -> console, rake
—–> Compiled slug size is 6.8MB
—–> Launching… done, v4
http://olabao.herokuapp.com deployed to Heroku
To git@heroku.com:oplabao.git
dd098e9..1706051 master -> masterI’ve also deployed on the facebook’s apps at: https://apps.facebook.com/oplabao
Any comments to share your experiences is WELCOME!
Thanks for your attending and see you in my next post 🙂
Leave a comment