They didn't have definition of OpenShift, but since you are reading this you probably know what it is. So you want to develop an application for Facebook and you wonder where to host it? That's one thing OpenShift can help you with.
The steps to create a simple Facebook application on OpenShift are very easy. I created a small "hello world" application with PHP to show how it's done.
Create OpenShift application
Go to OpenShift Online and create new PHP 5.3 application. I've used "facebooktest1" as the name here.
git clone ssh://...
cp -r ~/Downloads/facebook-php-sdk-master/src facebook
Create Facebook application
In this example I've used openshifttest1 as the application name.
Configure OpenShift environment variables
You'll need to set some environment variables in order to avoid having to insert Facebook App ID and App Secret into your source code. Namespace is your OpenShift domain name and application name is the OpenShift application name.
rhc set-env FBAPPID=365476396940042 --namespace twillber --app facebooktest1
rhc set-env FBAPPSECRET=hidden --namespace twillber --app facebooktest1
rhc set-env FBNAMESPACE=twillber-openshift --namespace twillber --app facebooktest1
Write the PHP application
Here is a very simple index.php just to show your Facebook name and user ID:
You can fetch the example code from here: http://people.redhat.com/~twillber/files/openshift/index.php.txt
Commit your code
At the end your directory structure should look like this:
| |-- base_facebook.php
| |-- facebook.php
| `-- fb_ca_chain_bundle.crt
1 directory, 4 files
Time to add the files and commit everything to OpenShift Online:
git add --all .
git commit -am 'created cool app'
Browse to your application and enjoy your hard work: https://apps.facebook.com/twillber-openshift/