Start developing
               Facebook apps in 13 steps
                   Hamamatsu.rb#8 2011.10.12 @mackato
                 @see http://devcenter.heroku.com/articles/facebook




11   10   12
1. Create a Heroku account



                    http://www.heroku.com/




11   10   12
2. Create a Facebook app
               https://developers.facebook.com/apps




11   10   12
3. Select Cloud Services
     https://developers.facebook.com/apps/APP_ID/summary




11   10   12
4. Create a Heroku app




11   10   12
5. Go to your Facebook app on
                          Heroku




11   10   12
6. Download and Install Heroku
                         Toolbelt


                    http://toolbelt.herokuapp.com/




11   10   12
7. Log in from the CLI

          % heroku login
          Enter your Heroku credentials.
          Email: mackato@gmail.com
          Password:
          Uploading ssh public key /Users/kato/.ssh/id_rsa.pub




11   10   12
8. Fetch App’s source code

                 https://floating-leaf-1045.herokuapp.com/
          % git clone git@heroku.com:floating-leaf-1045.git hamamatsurb-demo 
          -o heroku
          Cloning into hamamatsurb-demo...
          remote: Counting objects: 86, done.
          remote: Compressing objects: 100% (78/78), done.
          remote: Total 86 (delta 33), reused 0 (delta 0)
          Receiving objects: 100% (86/86), 58.72 KiB | 35 KiB/s, done.
          Resolving deltas: 100% (33/33), done.




11   10   12
9. Create another Facebook app
                       for development




11   10   12
10. Enter your local URL as Site
                            URL




11   10   12
11. Set Facebook Env Vars
                         Add Foreman to Gemfile
                              gem "foreman"



                   Create .env file in the root of your app

               FACEBOOK_APP_ID=YOUR_DEVELOPMENT_APP_ID
               FACEBOOK_SECRET=YOUR_DEVELOPMENT_APP_SECRET




11   10   12
12. Start local server
                    % foreman start
                  http://localhost:5000/




11   10   12
13. Commit and push your
                       changes
           % git ci -am "add foreman gem"
           % g push heroku
           Counting objects: 7, done.
           Delta compression using up to 8 threads.
           Compressing objects: 100% (4/4), done.
           Writing objects: 100% (4/4), 466 bytes, done.
           Total 4 (delta 3), reused 0 (delta 0)
           ...

           To git@heroku.com:floating-leaf-1045.git
             2ab1863..a9b4422 master -> master
11   10   12

Start developing Facebook apps in 13 steps

  • 1.
    Start developing Facebook apps in 13 steps Hamamatsu.rb#8 2011.10.12 @mackato @see http://devcenter.heroku.com/articles/facebook 11 10 12
  • 2.
    1. Create aHeroku account http://www.heroku.com/ 11 10 12
  • 3.
    2. Create aFacebook app https://developers.facebook.com/apps 11 10 12
  • 4.
    3. Select CloudServices https://developers.facebook.com/apps/APP_ID/summary 11 10 12
  • 5.
    4. Create aHeroku app 11 10 12
  • 6.
    5. Go toyour Facebook app on Heroku 11 10 12
  • 7.
    6. Download andInstall Heroku Toolbelt http://toolbelt.herokuapp.com/ 11 10 12
  • 8.
    7. Log infrom the CLI % heroku login Enter your Heroku credentials. Email: mackato@gmail.com Password: Uploading ssh public key /Users/kato/.ssh/id_rsa.pub 11 10 12
  • 9.
    8. Fetch App’ssource code https://floating-leaf-1045.herokuapp.com/ % git clone git@heroku.com:floating-leaf-1045.git hamamatsurb-demo -o heroku Cloning into hamamatsurb-demo... remote: Counting objects: 86, done. remote: Compressing objects: 100% (78/78), done. remote: Total 86 (delta 33), reused 0 (delta 0) Receiving objects: 100% (86/86), 58.72 KiB | 35 KiB/s, done. Resolving deltas: 100% (33/33), done. 11 10 12
  • 10.
    9. Create anotherFacebook app for development 11 10 12
  • 11.
    10. Enter yourlocal URL as Site URL 11 10 12
  • 12.
    11. Set FacebookEnv Vars Add Foreman to Gemfile gem "foreman" Create .env file in the root of your app FACEBOOK_APP_ID=YOUR_DEVELOPMENT_APP_ID FACEBOOK_SECRET=YOUR_DEVELOPMENT_APP_SECRET 11 10 12
  • 13.
    12. Start localserver % foreman start http://localhost:5000/ 11 10 12
  • 14.
    13. Commit andpush your changes % git ci -am "add foreman gem" % g push heroku Counting objects: 7, done. Delta compression using up to 8 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 466 bytes, done. Total 4 (delta 3), reused 0 (delta 0) ... To git@heroku.com:floating-leaf-1045.git 2ab1863..a9b4422 master -> master 11 10 12