I use CodeIgniter2.0.3 and facebook-php-sdk3.1.1 to develop an application.
When I run the project,is says:
Fatal error: Cannot redeclare class Facebook in ../application/libraries/facebook.php on line 24
The source of line 24 is:
class Facebook extends BaseFacebook
What’s the reason?How to deal with it?
Check the name of your controller. If it is called Facebook then that is your problem, you cannot have 2 classes called the same thing at once, unless they are in different namespaces.
I wouldn’t suggest using the normal Facebook PHP-SDK when there are a number available over on codeigniter sparks that perform most of the same functions but already setup to work with codeigniter without these conflicts.