A TEXT POST

Codeigniter + Facebook API

A lot of cool web apps these days come with the integration of at least Facebook Connect and the Facebook Graph API. Facebook actually supports a great SDK for PHP, which works great, but you might run in to some complications when implementing this sdk into your Codeigniter copy when you’re not that experienced.

There are two options I want to discuss today, first is Elliot Haughin’s library and then there is another approach by betterhelpworld.com.

Elliot Haughin
Elliot’s library is actually great for those who don’t want to know how to work with oAuth and REST API’s because everything goes “automagical” and just works. The big problem off course is that you don’t have a clue what actually happens inside which leads to problems if you want to debug or customize the library.

Betterhelpworld.com
The second approach I would like to show you is that of betterhelpworld.com, this is actually a blogpost that eventually turned into a codeigniter library and shows a very simple and well explained way of implementing the Facebook sdk into Codeigniter. In this post/tutorial you find a step by step explanation how you can connect to the php sdk and how it works. So, since you now understand how the library is build up you’ll be much more likely to customize it to your own needs.

Conclusion
As we can see both have their pros and cons but it all comes down to one question: do you want to use Facebook/oAuth implementations for the longterm (and get a deeper understanding of the whole process) or do you just want to implement it and hope for the best it’ll work just fine? Choose wisely.

  1. jrnbs posted this