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
I suggest you read this:
http://vanillaforums.org/discussion/comment/179874/#Comment_179874
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
My code above is referencing this post: http://vanillaforums.org/discussion/comment/135304
Just was hoping someone could take a peak and tell me if that code is correct and or matches their class.facebook.plugin. I have read through all the documentation that I could find and that you posted. Still can't get this FB to work properly.
Thanks for any help.
I would love to help, but I don't use Facebook (or Facebook Connect), so I am stuck suggesting other threads to read.
Welcome to the community!
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@Chris99460 check this out
http://vanillaforums.org/discussion/comment/179713/
Replace the files in facebook plugin with new ones. And update the config file as said.
It worked for me, couple of days back. But I can't see the facebook plugin in my dashboard any longer. Don't no the issue. But users can login with facebook. So am OK with that solution.