thyseus / yii-user-management

a user management module collection for the yii framework
185 stars 122 forks source link

Authentication failed! Facebook returned an invalid user id #139

Closed cinghie closed 8 years ago

cinghie commented 11 years ago

hi all,

i have use YUM in my Yii Project. I followed the instruction in the doc but i have this message when a user login with Facebook:

"Authentication failed! Facebook returned an invalid user id"

I have tried to solve it adding in base_facebook.php, in "public static $CURL_OPTS = array" the line "CURLOPT_SSL_VERIFYPEER => false," but this don't fix them.

Anyone can solve it?

cinghie commented 11 years ago

hi all,

i solve myself the problem, this is what I did:

1) in base_facebook.php, in "public static $CURL_OPTS = array" add the line the line "CURLOPT_SSL_VERIFYPEER => false," if you don't have the CURL in your server

2) Add to your template, in the HEAD section, the OpenGraph metatag: the essentials are "og:title", "og:url", "fb:app_id"

3) Check if you have any problem with the Facebook Object Debugger: https://developers.facebook.com/tools/debug/ and solve it

4) I use YiiBoilerplate and I had to edit the htaccess file that erased from the URL of the website www like that:

Comment "Option 1 Code" near the line 355

Decomment "Option 2 Code" near the line 366

Now for me, the HybridAuth Facebook Login work fine