Facebook-Login not working
I used the following constants:
include_jQuery = 1
allowCreate = 1
user_pid = 622
usergroup = 3
pid_loginPage = 628
uid_felogin = 1357
facebook_appID = xyz
facebook_appSecret = xyz
disable.felogin = 0
disable.google = 0
disable.yahoo = 0
disable.myopenid = 0
disable.wordpress = 0
disable.facebook = 0
disable.twitter = 1
622 is the system id of the folder with the fe_users
628 is the page where the plugin is located
1357 is the uid of the felogin plugin
Now when I try to log in with:
Google: It works!
So basically, the extension is working. :)
But the problem is facebook:
- I set up a facebook app named "Login WebsiteName"
- I set the domain and the application domain to my websites adress
- I inserted both the App ID and the App Secret into the constants
When I try to log in, I get the error:
Error while validating facebook token-parameter (OAuthException: An active access token must be used to query information about the current user.)
I already deleted all the other test-accounts completely from the feusers-table to make sure there is no conflict... Did I miss any settings in my facebook-app?
#2 Updated by Markus Kappe about 8 years ago
How can I reproduce this error?
Never seen a PIN-mechanism from twitter. Not sure how this should work.
Is your TYPO3 properly configured to use UTF-8?
Can there be a timeout?
Do you have a load balancer or something other that can break a session?
You can send a backend login to email@example.com and I will debug this issue
#4 Updated by Christian Eßl about 8 years ago
Yes, TYPO3 is properly using UTF-8.
Timeout... not sure, but there is no timelag.
When I manually output the $response from 'https://graph.facebook.com/oauth/access_token', it shows:
What I forgot to mention: I commented out line 489 in class.tx_dixeasylogin_pi1.php before:
//$error = sprintf($GLOBALS['piObj']->pi_getLL('error_validate_fb'), $decoded['error']['type'], $decoded['error']['message']); // Error while validating facebook code-parameter (%s: %s)
Because it threw the following error:
Fatal error: Cannot use string offset as an array in /srv/www/vhosts/website.at/httpdocs/typo3conf/ext/dix_easylogin/pi1/class.tx_dixeasylogin_pi1.php on line 489
Now, when I look more particularly at the code, it looks like the $response is thrown back in a way back to me, that it should'nt be. Because when the $response runs through the json_decode()-function, it should give back an array.
But what I am getting back from manually outputting $response is a simple string, no json-markup, as mentioned above.
The exact request uri that was sent by the extension is:
(which also outputs the "access_token=AAAE.....&expires=4708"-string)
#5 Updated by Markus Kappe about 8 years ago
You look at the wrong place. Have a look at tx_dixeasylogin_facebook::getUserInfo() and debug this $response (~line 502)
Please debug $response and $decoded.
Additionally the error on line 489 should not have occured with the $response in tx_dixeasylogin_facebook::getToken(). Your $response will be json_decode'd correctly into an array without the "error" entry -> so it does not reach line 489 because of the if() the line before.
#6 Updated by Christian Eßl about 8 years ago
Just migrated the complete typo3-installation to another server. - Now the facebook login is working with exactly the same settings.
Are there any special requirements in PHP version, etc.?
The old server, for example, has PHP_VERSION: 5.2.6. The new server has PHP_VERSION: 5.3.8.
I don't know which Apache-settings could be relevant for this extension.