Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (28 sloc) 1.72 KB

Instructions for Kohana + Facebook Demo

By: Chris Benard

Created for the Dallas PHP Users Group Meeting

January 11, 2011

Follow these steps:

  1. Copy the entire directory structure to your web document root. e.g. application directory should be in /, relative to the document root

  2. Create a Facebook application at

  3. Import the included kohanafacebook.sql file into a MySQL database, using PHPMyAdmin's import feature, the import feature of your preferred MySQL IDE, or the mysql command line tool.

  4. Edit / and fill in the appropriate values, from your Facebook application's settings page and from your MySQL Database into which you just imported the test settings.

  5. Edit .htaccess to reflect the correct RewriteBase. This should match the baseurl in / If you host it at, the baseurl and RewriteBase should be /. If you host it at, the baseurl and RewriteBase should be /kohana/.

  6. Get your Facebook numeric ID. If you go to your Facebook page and it looks like, go to - This will give you your numeric ID. If your page looks like, 1234567890 is your numeric Facebook ID.

  7. Add your Facebook numeric ID into the admins table in the MySQL database so that you can be an admin on the site. Feel free to remove the others in there (mine).

  8. (Optional) Delete the kohanafacebook.sql file in your web root so that potential attackers cannot access it via the website.

You can’t perform that action at this time.