Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
4.0k views
in Q2A Core by
I am using q2a open login plugin for my q2a site to activate open-login with facebook and google plus. In earlier I worked in " http://myq2asite.com/subdomain/index.php " as test purpose. And I give this Url as the redirect URL on both facebook application and google project.

But yesterday the pack get inserted into root directory for the site launch. So now site will get on directly " http://myq2asite.com/ " without use of subdomain. So the same time I edited the redirect URL with new URL on both facebook app and google project.

Here the problem begins

facebook redirected into : - > http://myq2asite.com/index.php?provider=Facebook&code=5# [not working] . So I checked with that code . code=5 means authentication failed

Google plus rediected into :-> http://myq2asite.com/index.php?qa=login&login=googleplus&to=index.php?qa=users. And also the page showing some fatal error.

The error is :

    Notice: Undefined variable: adapter in /home/name/public_html/qa-plugin/q2a-open-login-master/qa-open-login.php on line 120

    Fatal error: Call to a member function logout() on a non-object in /home/name/public_html/qa-plugin/q2a-open-login-master/qa-open-login.php on line 120

I didn't get any Idea for these issue. Is there any need to create a new apllication with new URL.??? Or any other solution

Please help me asap.

Thanks in advance
Q2A version: version 1.6.3
by
anyone please help me

1 Answer

0 votes
by
1) first of all check if the  "Preferred Site URL" of your q2a site is correct :
Admin---> General
Now it should be equal to = http://myq2asite.com
 
2) On your facebook App, Settings. check that you have :
App Domains = myq2asite.com
Website --> Site URL = http://myq2asite.com
 
3) Try to insert this line :
error_log(print_r('****** qa-open-login.php::check_login EXCEPTION ! : '.$e, TRUE));
 
just ***before*** this line :
 
clear completely your browser cache, retry to login and check the message on your error log file
by
edited by
Got this

When $url = 'https://graph.facebook.com/';

errno = 7
Failed to connect to 2a03:2880:20:4f06:face:b00c:0:1: Network is unreachable
http_code = 0

and  $url = 'http://www.google.com/';
errno = 7
Failed to connect to 2607:f8b0:4009:803::1014: Network is unreachable
http_code = 0
by
ok, you are in a "box" :-)
You cannot make even http invocations.
Ask your hosting provider as above
by
But using phpinfo()

I got Curl enabled

cURL Information     7.24.0
by
Yes curl is enabled. But it cannot "go out"
...