phpfacebooksymfonylaravel-4hybridauth

hybridauth thirdparty Facebook autoload failed opening laravel after composer install


I used composer to install hybridauth in my laravel 4 application. When i tried to get user profile with facebook provider :

$userProfile = $provider->getUserProfile();

I have this error :

Symfony \ Component \ Debug \ Exception \ FatalErrorException Hybrid_Providers_Facebook::initialize(): Failed opening required '...laravel/vendor/hybridauth/hybridauth/hybridauth/Hybrid/thirdparty/Facebook/autoload.php' (include_path='.../laravel/vendor/phpseclib/phpseclib/phpseclib:.:/usr/local/php5.6/lib/php')

It seems like thirdparty/Facebook/autoload.php is required but I didn't have this autoload file in the directory. Is it a problem with the composer install?

my thirdparty file :

Could you help me please?


Solution

  • The version you are using is not as straight forward as the previous versions. You do need to get the Facebook API from https://github.com/facebook/php-graph-sdk first. Then extract to the "third party" folder. You only need the folder that contains all the Facebook API files and folders. Examples for files: autoload.php, facebook.php, etc.... and it's folders including "Authentication", "Exceptions", etc.... Structure will be "hybridauth\Hybrid\thirdparty\Facebook"