https://toolbelt.herokuapp.com
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- https://toolbelt.heroku.com/install.sh | sh
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.
# make sure to remember the passphrase.
Now login to Heroku.
Heroku login
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 git@heroku.com:morning-ocean-8757.git -o heroku
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.
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.
https://morning-ocean-8757.herokuapp.com
Now the app should be added to the page. Use the following URL to add the app to the page tab
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
For this particular app it should be as follows.
https://www.facebook.com/dialog/pagetab?app_id=153825634746333&next=https://morning-ocean-8757.herokuapp.com
Select the page you want to add the app. If you don't have a page yet, create one. It is free.
Now it is being displayed in your page tabs. Click on tab to visit the app.
Now the app has been integrated to the page tab.
Visit app integrated page tab below.
https://www.facebook.com/pages/PHP-Sri-Lanka/155553284581042?sk=app_153825634746333
Visit original app hosted in Heroku servers below.
https://morning-ocean-8757.herokuapp.com
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