Integrating Facebook PHP SDK is not that hard, it only takes few minutes to do that. But its completely different story when you are integrating it with CodeIgniter.
Thats because Facebook PHP SDK takes input from $_REQUEST variable while CodeIgniter purges the $_REQUEST variable for security reasons. Other important reason is theres no dedicated library available for it (while there are few available for Twitter) and there is vast range of solutions if you search for it but no proper solution (atleast I didn’t find one).
So I decided to create one and worked on it last week.
Facebook PHP SDK for CodeIgniter on Github
There are four folders config, controllers, libraries and views. All you need to do is, copy these folders to application folder of your CI installation.
Then replace your facebook application id and secret in facebook.php file under config folder:
$config['appId'] = 'APP_ID_HERE';
$config['secret'] = 'SECRET_HERE';
And thats it. Try accessing domain.com/welcome/login (localhost if testing locally).
Few things to double check:
- Your FB application is not on Sandbox mode.
- Your website domain (or localhost if testing locally) is listed in app domains.
- Website with Facebook Login is enabled and pointed to your domain.
- App type is set to Web under advance settings.
- Client OAuth Login is enabled under advance settings.
Now, This one is going to be completely Pwing Update! Better painting, more theme colors, supports more components and introducing ‘PStylishFrame’.
Lets talk about PStylishFrame, inspired from LooknFeel of Mozilla Firefox 4, Google Chrome and other latest web browsers. We ( I and my trainee’s ) decided to create one such stylish frame for Pwing users. So here’s the very first screen shot of Pwing’s PStylishFrame.
We are not yet done with it. Currently it supports Pwing’s Black color theme only. It’s not resizeable. It supports PStatusBar, which is another new component added in Pwing toolkit.
We have made few changes in component painting for better performance. Changed the Pwing’s component Hierarchy. Now most of the components extends ‘PComponent’ as their Superclass. PComponent has all the basic properties required to create a Pwing based component.
Pwing supports 4 color themes now and those are Black, Blue, Pink and Green. Blue is default theme for all the components if you don’t set any Theme Controller (Controller class) on them.
List of new added Components : PComponent, PStylishFrame, PStatusBar and PProgressBar.
Upcoming Components : PStylishMenu, PScaleBar, and PSplash.
I will update source on SVN Repository but Binary/Source JARs will posted once components listed above are done and tested on all color themes.
Pwing’s Project Page
We have published “Pwing”, An other Open Source project.
||Pwing is a GUI toolkit, Is a set of widgets/components for use in designing applications with graphical user interfaces (GUI’s). It is based on Swing toolkit, part of Sun Microsystem’s Java Foundation Classes (JFC) API. It is developed to provide a better set of components to create more interactive GUI based applications in Java. Each component facilitates a specific user-computer interaction, and appears as a visible part of the computer’s GUI.
Examples, Executable JAR’s , Source JAR’s and Complete package is available for download.
Official Pwing Website : https://puneetk.com/pwing
Pwing’s SF Website : http://sourceforge.net/projects/pwing/
Pwing - Custom GUI for Java
Introducing Pwing ..
Pwing is a GUI toolkit, Is a set of widgets/components for use in designing applications with graphical user interfaces (GUI’s). It is based on Swing toolkit, part of Sun Microsystem’s Java Foundation Classes (JFC) API. It is developed to provide a better set of components to create more interactive GUI based applications in Java. Each component facilitates a specific user-computer interaction, and appears as a visible part of the computer’s GUI.
Pwing is currently being developed by a merge team of my trainees and Parul Kalra‘s trainees at MBN Informatics. Soon it will be published as Open Source project on SourceForge.
Stay tuned !
Hope you all enjoyed your new year holidays so i did Belated Happy New Year to all of you. The reason i haven’t update anything on website is, GNIIT Semester B Exams (Over now). I entered Semester C of my GNIIT course.
These days, im working on developing a Object-Relational Mapping Framework, Thats Pikk.
Pikk’s primary feature is Object-Relational mapping from Java classes to database tables and from Java data types to SQL data types. Pikk also supports data query and retrieval facilities. Pikk generates the SQL calls and relieves the developer from manual result set handling, object conversion and keeping the application portable to all supported SQL databases.
Mapping Java classes to database tables is done by Java classes and a single PikkMapping file ( auto generated by Framework ).
Pikk also supports one-to-many and many-to-many relationship between classes and so for database tables. It also provides many manipulation methods so developer can focus on programming logic.
I’m still working on it and will be out for you soon.
Stay tuned! Regards,