I want to be able to use the Facebook PHP SDK with the new ZEND Framework 2 platform. How to do it?
Zend Framework 2 is quite different as previous version ZF1.
When I try the standard PHP in the main application controller IndexController':
require_once("facebook.php"); class IndexController extends AbstractActionController { public $facebook; public function __construct() { $this->facebook = new Facebook(array( 'appId' => 'appId', 'secret' => 'secret_key' )); } /* ... */ }
I get following error: Fatal error: Cannot redeclare class Facebook in /../module/Application/src/Application/Controller/Facebook.php on line 160