Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Again UniqueID is required. Facebook oauth login problem.
mye
New
I've got the same problem as discussed before but I can't solve it
vanilla 2.1.1 Tried: 1. * Facebook dev app - not in sandbox mode and set in website mode with urls 2. * correct values of Application ID & Application Secret 3. * checked php enabled cUrl, enabled OpenSSL 4. * updated in class.facebook.plugin.php as said here
public function GetProfile($AccessToken) { $Url = "https://graph.facebook.com/me?access_token=$AccessToken"; // $C = curl_init(); // curl_setopt($C, CURLOPT_RETURNTRANSFER, TRUE); // curl_setopt($C, CURLOPT_SSL_VERIFYPEER, FALSE); // curl_setopt($C, CURLOPT_URL, $Url); // $Contents = curl_exec($C); // $Contents = ProxyRequest($Url); $Contents = $this->file_get_contents_curl($Url); $Profile = json_decode($Contents, TRUE); return $Profile; } function file_get_contents_curl($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } Still got that UniqueID is required.
I'm stuck.
0
Comments
Can you verify that your application ID and secret appears in your config.php?
You could also try using the facebook plugin from here:
https://github.com/vanilla/vanilla/tree/master/plugins/Facebook
Don't make any changes to the code, the change you linked to was suggested by someone in 2011, a lot has changed since then.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Yes. I've got lines in config.php
I've got that latest plugin. not edited.
I had recreate Facebook app again step by step from here http://blog.vanillaforums.com/facebook-application-for-vanillaforums-sso/
It's green (not in sand box) and site is set correct
same UniqueID is required.
Are any of the other social login plugins like Twitter or Google working?
If yes, temporarily add this to line 341 of the plugin:
file_put_contents('log.txt', print_r($Profile, true));
and inspect what has been written to the log.txt, there should be a field "id"
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Yes Twitter and Google Plus auth are working
I have no log.txt. It doesn't appearing in anywhere
Change the 'log.txt' into some path you know thats writeable by php, for example the uploads folder:
file_put_contents(PATH_UPLOADS.'/facebooktest.txt', print_r($Profile, true));
and on a second thought, add it before line 523 (right before the
return $Profile;
)Then try to log in.
Also enable debugging by adding this to your config:
$Configuration['Debug'] = TRUE;
This is just to capture the data you are getting back from facebook, if anything at all.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
It doesn't create facebooktest.txt.
Uploads folder is accessible. profile picture I can change and new pic can be uploaded.
Hm, then I really don't know what to do.
I just tested this on an installation with working facebook social sign in and got back something like:
Have you enabled debugging, do you get any debug messages?
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I think the problem is that It just don't go up to the function GetProfile() that's why the log doesn't generate
debugging is active
it give me an error
"There was an error with the Facebook connection.
UniqueID is required."
$AccessToken return empty
Error is generated in line 447
It's either one of 2 things:
You could log the response you get from facebook the same way i proposed above in the GetAccessToken function (look whats in the variable $Contents).
However, if facebook returned an error, vanilla would show it.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
$Info = curl_getinfo($C); from GetAccessToken() return that
[primary_ip] => 127.0.0.1 ????
$Contents = curl_exec($C);
but print_r($Contents, true) seem like empty
Please remove your application secret and accesstoken from the info above.
Seems like you are trying to connect from localhost? Facebook doesn't allow that.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
http://www.aquastaff.com/
I'm trying from here
application secret and access token are distorted
Looks like you are not getting anything back from the curl call.
Contact your hoster and ask about the curl functions, which ones are enabled, if there are any restrictions and if OpenSSL is enabled.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
they have curl and openssl enabled. But I send a ticker to hosted. Which version of PHP is better? 5.2, 5.3, 5.4, or 5.5? I've got option to choose from.
Use 5.4 or 5.5 (5.4 will be required in the future)
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Already tall him problem was on curl call...Why don't u test it using another host
In vanilla Facebook plugin, It's very easy to find someone Application ID,Application Secret using small trick
Any recommendation on free hosting to try?
Of course I altered Application I and Application Secret. They are not real.
try to echo
echo $Contents = curl_exec($C);
if didn't get anything,that mean u host not yet supporting curl url
(that was the method,how i discovered above error )