• let’s engage

    Send us a message and our senior staff will get back in touch.

  • This field is for validation purposes and should be left unchanged.




CodeIgniter 2.1.0 and Facebook API Starter Kit

Team Engage

Team Engage

I’ve dabbled with the Facebook PHP SDK plenty of times before, and Facebook does a really awesome job of making it simple to use their SDK and their Graph API. The development and creative team at Engage know how much I love the Open-Source PHP Framework CodeIgniter by EllisLab . It’s a high-performing and extremely light-weight MVC (Model-View-Controller) Framework that has a very small foot-print when compared to the other frameworks out there. Best of all, it requires nearly zero-configuration to get setup on a web server.

I’ve been doing some research on how other developers integrate Facebook’s SDK into Codeigniter, and I haven’t seen any real solid working examples of a best practice. So I decided to throw my two-cents at it, and am releasing my findings publicly for everyone to use!

To get it setup, all you have to do is follow the very short README file instructions, and you’ll have a working example in no time. Here’s an overview of the important files to look at:

  • application/conifg/Facebook.php
  • application/config/Stellar.php
  • application/libraries
  • Controllers and Models
  • application/config/autoload.php

Below you’ll find links to a working demo, the source on my GitHub Repository, and a support forum. If anyone has any questions, please feel free to email me at nick@engagedc.com. Thanks, and I hope this at least helps one person out there!

  • Srinivasan Ramachandran

    2013-03-22 18:20:00

    Hi Nick, Firstly kudos to you for this wonderful framework. I have a couple of questions. 1 - When I enable the curl extension it works fine on my localhost. But when I upload the files to my webserver, I get a 500 Internal Server Error. I thought the curl extension was not enabled and thus asked my domain support team. They simply say that the curl extension is already enabled. Any ideas what am I missing here? 2 - Can your framework be used for Canvas application development also? Sorry if my questions had been very stupid Regards, #0K Srinivasan

  • Otis Tetrax

    2013-01-23 20:48:00

    Just used this to put add some facebook connectivity to a site I'm working on, had to come back and say thanks, it was a nightmare trying to work out what was actually going on in the mishmash of methods that are already out there. Much appreciated!

  • Picko

    2012-12-29 19:57:00

    There is a small bug though. Whenever I log in the first time then logout then attempt to login the second time the app goes into a loop. test it on the demo (http://stellarfrequency.com/)

  • Martin

    2012-12-11 03:04:00

    Hi Nick, I like this basic code except that I've got a little bug like this -->  A PHP Error was encounteredSeverity: WarningMessage: Invalid argument supplied for foreach()Filename: fb/likes_view.phpLine Number: 11

  • Katell Brooks

    2012-10-25 08:14:00

    Even I think that CodeIgniter is one of the good framework that allows you to have working website in few minutes and that also according to your conveniency. 

  • Deep Doradla

    2012-10-14 15:23:00

    Hi Nick, I tried the your code ... I  am able to authenticate the user but once authenticated it goes to "http://www.abc.com/test/index.php?secure" ... and then I get the following message  " 404 Page Not Found The page you requested was not found."  First I was gettting "Call to a member function num_rows() on a non-object " and then later the above message.  Please Help me solve this issue. Thanks a lot in advance. 

  • Tarek

    2012-07-30 04:26:00

    PERFECT  really appreciate  your work , thanks man

  • Ultimate Collection of Free PHP Framework, Scripts, Kickstarters, Boilerplates & Starter Kits | KellyMarie

    2012-07-23 00:14:30

    [...] Codelgniter 2.1.o and Facebook API Starter Kit [...]

  • Brian Cooper

    2012-05-31 13:41:00

    nice job buddy!

  • CodeIgniter 2.1.0 and Facebook API Starter Kit | Engage | Print Server Reviews

    2012-05-08 23:26:41

    [...] CodeIgniter 2.1.0 and Facebook API Starter Kit | Engage Share this post to your [...]