Posted by Arjun on Sunday 18th May 2014

How to Use the Facebook API with Codeigniter

CodeIgniter Helper Facebook FB SDK

This post shows you how to get the sample Facebook application working with the CodeIgniter framework. For PHP Facebook has an PHP Facebook API and it is located on github. This library gives the php developer much more intuitive access to the facebook api methods and entities.

Download Facebook PHP API ?

To Download Facebook PHP SDK (v.3.2.3) click here
To Download Facebook PHP SDK (v.4) click here

Getting Started

So, let's get started with your first Facebook application written with CodeIgniter. By the end of it, you'll have everything you need to create a Facebook application.

1. Download CodeIgnier Framework and Install it. if you install currently , You should see the generic message, "Welcome to CodeIgniter!" If you don't, you've missed something along the way. Reinstall CodeIgniter and start over.

2. Go to and set up a new application.

3. now download Codeigniter Facebook SDK library, to download click here

4.copy and place config and library directory in your ci app.

How do I use it?

You can load the facebook sdk like other libraries in Codeigniter , but you need to set config values in config/facebook.php , Enter your app ID and secret code there.


That's it your done!.