bakedproject.com Blog Not just another WordPress weblog

15Jan/100

GET URL with Codeigniter

I copied the Codeigniter URI library to my application libraries folder. Keeping the same name ensures CI would read my custom URI library, not the default one.

Add custom functionality(whatever needs to be done to the GET variables) to

function _filter_uri($str)

I am parsing the string and returning CI friendly URI!

function _filter_uri($str)
{

5Jan/100

Building Facebook and Facebook Connect application with Codeigniter – Setup

Developing for Facebook is quite simple and easy if you have the right components.  I used Codeingniter as a base framework for a few Facebook applications and that works pretty well .  I had to do some little tweaking though.

This entry is not about how to build a Facebook application in Codeigniter, its more like the things that I have done to get it going...

I named my controller “fbook”. Very important as the Facebook library is “Facebook” under “application/libraries/”

The “Facebook” PHP client comes with 3 main files,
1. facebook_desktop.php
2. facebookapi_php5_restlib.php
3. facebook.php
We need to create a CI library from these 3 files and the “jsonwrapper”. Create a “facebook-clinet” folder under “application/libraries” folder. Copy paste all the files from the Facebook API library except “facebook.php” to this newly created folder. Rename the “facebook.php” file to “Facebook.php” and place it under “application/libraries” folder. Add the following line to the “Facebook.php” file
include_once 'facebook-client/facebookapi_php5_restlib.php';
This will include the REST library.

This is pretty much the initial setup. You can use the same “Facebook” library to for “Facebook Connect” functionality.