简体   繁体   English

HybridAuth Facebook返回了无效的用户ID

[英]HybridAuth Facebook returned an invalid user id

I am getting the following error: 我收到以下错误:

Authentication failed. The user has canceled the authentication or the provider refused the connection.
Original error message: Authentication failed! Facebook returned an invalid user id.

tried a lot of things like to add in the base_facebook.php 尝试过很多东西,比如在base_facebook.php中添加

CURLOPT_SSL_VERIFYPEER => false

aswell as to improve the curl timeout, but it wont works. 以及改善卷曲超时,但它不会工作。
The app isnt in facebook sandbox mode anymore so I literally have no guess left. 该应用程序不再在Facebook沙盒模式,所以我真的没有猜测。

I just solved that problem by setting the "Is your App Secret embedded?" 我刚刚通过设置“嵌入你的应用程序密钥吗?”解决了这个问题。 switch to "no" in the "advanced settings" tab on https://developers.facebook.com/x/apps/myid/settings/advanced/ . https://developers.facebook.com/x/apps/myid/settings/advanced/上的“高级设置”标签中切换到“否”。

Recently this occurred due to facebook graph API change, v2.2 is depreciate https://developers.facebook.com/docs/apps/changelog 最近发生这种情况是由于facebook图形API的变化,v2.2正在贬值https://developers.facebook.com/docs/apps/changelog

So we need to change php facebook-sdk for facebook graph api latest version v2.8. 所以我们需要更改php facebook-sdk for facebook graph api最新版本v2.8。 you can download the sdk from https://github.com/facebook/php-graph-sdk 你可以从https://github.com/facebook/php-graph-sdk下载sdk

after replacing sdk you may need to add auto-load configurations for facebook sdk. 更换sdk后,您可能需要为facebook sdk添加自动加载配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM