Instructions for Kohana + Facebook Demo
Created for the Dallas PHP Users Group Meeting
January 11, 2011
Follow these steps:
Copy the entire directory structure to your web document root. e.g. application directory should be in
/, relative to the document root
Create a Facebook application at http://www.facebook.com/developers/
Import the included
kohanafacebook.sqlfile into a MySQL database, using PHPMyAdmin's import feature, the import feature of your preferred MySQL IDE, or the mysql command line tool.
/config.inc.phpand 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.
.htaccessto reflect the correct RewriteBase. This should match the baseurl in
/config.inc.php. If you host it at
/. If you host it at
http://site.com/kohana/, the baseurl and RewriteBase should be /kohana/.
Get your Facebook numeric ID. If you go to your Facebook page and it looks like
http://facebook.com/FriendlyUserName, go to
http://graph.facebook.com/FriendlyUserName- This will give you your numeric ID. If your page looks like
1234567890is your numeric Facebook ID.
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).
(Optional) Delete the
kohanafacebook.sqlfile in your web root so that potential attackers cannot access it via the website.