2017-04-20 127 views
0

我試圖配置hybridauth庫,這樣我就可以使用谷歌的+和Facebook的跡象,但它讓我給一個致命的錯誤:HYbridauth的Facebook登錄不起作用

Fatal error: require(): Failed opening required 'Facebook\Facebook.php' (include_path='.:/var/www/magilla/lib:/var/www/magilla/models') in /var/www/magilla/lib/RPC/Util.php on line 168 

I followed each and every step of their documentation. I have used the composer to install the library. The library version is 2.9 and the facebook graph sdk, the most recent version of github

回答

0

讀編輯* 2,爲妥善解決,而不是

我遇到了同樣的問題,我想你安裝hybridauth像我一樣以同樣的方式,這是你的項目的根文件夾中運行composer require hybridauth/hybridauth

I solved this by running composer install within the hybridauth directory where its composer.json exist, that will install facebook sdk within the hybridauth directory where the autoload.php is being load by the script (I personally feel like it is more like a hack than a proper solution... but I have a feeling that the hybridauth developer expect you to clone then run the composer install instead of composer requiring it...I maybe wrong as I just start using composer as well)

*編輯check out the issue on their github,存在賣主路徑在它們的代碼被替換由一個錯誤,它也提到它被固定在以後提交。我也是新作曲家,所以我不知道如何具體承諾它更新到...如果你知道如何做它讓我知道以及

*編輯* 2好吧,我更新到2.9.3-dev,它似乎解決了這個問題,而不會產生任何新的問題,我也使用谷歌和微博,這些也很好。要更新,編輯自己的composer.json這個

"require": { 
     "hybridauth/hybridauth": "^2.9-dev" 
    } 

然後在你的命令提示符下運行composer update,事情應該只要你需要作曲家autoload.php工作,您的腳本