Facebook authentication does not work
-
I encountered a strange error with facebook authentication (log in to websites with facebook) while working with SVC:
Domains, protocols and ports must match.
the complete error displayed by Chrome's Javascript console:
FB.init has already been called - this could indicate a problem 2 connect.facebook.net/en_US/all.js:45Unsafe JavaScript attempt to access frame with URL https://www.facebo ok.com/dialog/oauthaccess_token=AAACZBKdKUQRQBALGpUB5sPurx2HGrZBNLDvIATjEZB8VNZCj5syo5hTekAuKVm7VhOFZAUsK4P8CWQNc H2lZBATMt3JZCwJvVr1JWAlda0pXUhvWbvATkdD&api_key=209086835867924&app_id=209086835867924&client_id=20908683 5867924&display=popup&domain=www.govido.com&locale=en_US&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.faceboo k.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D5%23cb%3Df30017ccf8%26origin%3Dhttp%253A%252F%252Fwww.gov ido.com%252Ff96b8444%26domain%3Dwww.govido.com%26relation%3Dopener%26frame%3Df2612a9bb8&response_type= token%2Csigned_request&scope=xmpp_login%2Cuser_location%2Cuser_hometown%2Cuser_birthday%2Cfriends_location%2 Cfriends_hometown%2Cfriends_birthday%2Cpublish_stream&sdk=joey from frame with URL http://www.govido.com/. Doma ins, protocols and ports must match.
The solution was something else than expected, wasn't the facebook API nor the php script but a server setting: HTTPS not supported or disabled in libcurl
[error] => Array ( [message] => Protocol https not supported or disabled in libcurl [type] => CurlException )
curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos…), file transfer resume, proxy tunneling and a busload of other useful tricks.
Solution: enable HTTPS in libcurl