Developing and Deploying with Heroku

I am going to develop this app with Heroku toolbelt. Download the toolbelt and install it in your computer.

get heroku toolbelt

I am using Ubuntu. If you are using Ubuntu you can use the following wget method to install it. If you are using Windows follow the guidelines in Heroku site. It is very easy to install the toolbelt in any OS.

wget -qO- | sh

install heroku toolbelt

Windows users may skip this step. You should add keys and upload them into Heroku servers.

ssh-keygen -t rsa -f id_rsa
# make sure to remember the passphrase.

adding heroku keys

Now login to Heroku.

Heroku login

login to heroku

Clone the remote git repo into your local folder. This is just getting the source app files in the Heroku server to your computer for editing.

git clone -o heroku

clone heroku git repo

Now we will edit the index file of the app. I will just edit some lines. You can use any text editor to edit this. notepad, wordpad, dreamviewer, nano, gedit, bluefish, compozer, etc.

edit facebook app files

Put the edited source files back to the server. Browse again to the Facebook App URL. You will see the changes you did to your app index.php file.

updated heroku facebook app

Now the app should be added to the page. Use the following URL to add the app to the page tab

For this particular app it should be as follows.

Select the page you want to add the app. If you don't have a page yet, create one. It is free.

add facebook app to profile tab

Now it is being displayed in your page tabs. Click on tab to visit the app.

facebook app is added to tab

Now the app has been integrated to the page tab.

app on tab

Visit app integrated page tab below.

Visit original app hosted in Heroku servers below.

simple facebook app

This concludes Part 2. Browse the other parts.

Part 1: Simple Facebook Like Gate with Heroku Hosting
Part 2: Developing and Deploying with Heroku
Part 3: Implementing the Facebook Like Gate

No comments:

Post a Comment