用于Facebook登录的HYbridauth不起作用 [英] HYbridauth for facebook login doesn't work

查看:101
本文介绍了用于Facebook登录的HYbridauth不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置hybridauth库,以便可以使用google +和facebook登录.但是,这使我仍然出现致命错误:

I was trying to configure the hybridauth library so that I can use the the google + and the facebook sign in. But it keeps me giving a fatal error:

 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

我遵循了他们文档的每个步骤.我用过 作曲家安装库.库版本为2.9,并且 facebook graph sdk,github的最新版本

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

推荐答案

请阅读EDIT * 2作为适当的解决方案

我遇到了相同的问题,我想您以与我相同的方式安装hybridauth,它在项目根文件夹中运行composer require hybridauth/hybridauth.

I am encountering the same issue and I suppose you install hybridauth the same way as I did, which is running composer require hybridauth/hybridauth on your project root folder.

我通过在hybridauth中运行composer install解决了这个问题 它的composer.json存在的目录,该目录将安装facebook Hybridload目录中的sdk,其中是autoload.php所在的位置 由脚本加载(我个人觉得它更像是hack,而不是 适当的解决方案...但是我有一种感觉,hybridAuth 开发人员希望您克隆然后运行composer install而不是 作曲家需要它...我刚开始使用作曲家时可能错了 也是

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)

* EDIT 在他们的github上查看问题,这里有一个错误供应商路径在其代码中被替换为一个,还提到在以后的提交中已修复该路径.我也是作曲者的新手,所以我不知道如何具体指定提交内容以将其更新为...如果您知道如何做,也请让我知道

*EDIT check out the issue on their github, there is a bug where the vendor path is being replaced by one in their code, it also mention it is being fixed in later commit. I am new to composer as well so I don't know how to specific the commit for it to update to... if you know how to do it let me know as well

* EDIT * 2好吧,我更新到2.9.3-dev,似乎可以解决此问题而不生成任何新的,我也将它用于google和twitter,它们也很好.要更新,请将您的composer.json修改为此

*EDIT*2 alright, I updated to 2.9.3-dev and it seems to solve the issue without generating any new one, I also use that for google and twitter and those are fine too. To update, edit your composer.json to this

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

然后在命令提示符下运行composer update,只要您需要脚本的composer autoload.php,一切就可以正常工作

then run composer update on your command prompt, things should work as long as you require the composer autoload.php for your script

这篇关于用于Facebook登录的HYbridauth不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆