Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
1.2k views
in Q2A Core by

I've managed to turn facebook integration on, I entered my App ID and secret, but after clicking on FB Login I get this error:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/14/d343998795/htdocs/qa-plugin/facebook-login/qa-facebook-login.php on line 70

Warning: file_get_contents(https://graph.facebook.com/me?access_token=163161903714103|2.9OdsFPqijQUlLGx718hmYQ__.3600.1288915200-1073029221|5qCYZdS_FE1rlRfeCqXzw_5XJPg&fields=picture) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/14/d343998795/htdocs/qa-plugin/facebook-login/qa-facebook-login.php on line 70

My site: http://quanda.pl

by
I think for security and compatibility there should be an option to use file_get and Curl should be the default.
I'm considering writing a Curl function for file_get over altering my config because of security flaws.

2 Answers

+1 vote
by
Yes, FB login uses the file_get_contents(...) function to make the Facebook API request, but some PHP configurations prevent this. Is it possible for you to change this in your PHP configuration? I will also try to find some workarounds for the 1.3 release.
by
I'll investigate it, and let you know about results. Anyway, I think, that the workaround would be more than welcome, as it could impact more sites.
by
I've found this topic on the net:
http://drupal.org/node/262815
I know, that it's about drupal, but they are using curl function to bypass this restriction. It's mentioned there about 1and1 host, which is exactly my case.
Also, check this:
http://it.toolbox.com/wiki/index.php/Switch_from_file_get_contents_to_curl
by
edited by
Similar problem.
The plug-in doesn't work.
disable_functions = no value.
by
Thank you for implementing CURL! I've just tested 1.3 beta 2 and it works like a charm! No lags, no hangs, everything works as expected.
0 votes
by
I asked the host to enable CURL on the site and it worked right after that. I would also check on facebook app settings, website, siteurl and domain and make sure the information is correct.
...