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

Facebook Login Bug

Need help please. First time using vanilla. Ran into a snag with Facebook login on my site. I configured it correctly with the codes and read a post on the forum here about the file class.facebook.plugin Evidently, there is a bug. The error I get when trying to link Facebook with my forum is this:

Facebook Connect UniqueID is required.

This is what my code currently looks like in class.facebook.plugin:

(CAN SOMEONE PLEASE post the correct code or help me fix?)

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;
}

Thank you in advance for helping a newbie!

Comments

Sign In or Register to comment.