HybridAuth Facebook returned an invalid user id

回眸只為那壹抹淺笑 提交于 2019-12-18 08:55:34

问题


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

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.


回答1:


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/ .




回答2:


Recently this occurred due to facebook graph API change, v2.2 is depreciate https://developers.facebook.com/docs/apps/changelog

So we need to change php facebook-sdk for facebook graph api latest version v2.8. you can download the sdk from https://github.com/facebook/php-graph-sdk

after replacing sdk you may need to add auto-load configurations for facebook sdk.



来源:https://stackoverflow.com/questions/20777100/hybridauth-facebook-returned-an-invalid-user-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!