Getting a error when trying to login
When I tryied to login I keep getting this error:
Notice: Undefined property: stdClass::$data en fboauth_access_token() (line 292 ****/sites/all/modules/fboauth/includes/fboauth.fboauth.inc).
The Facebook login could not be completed due to an error. Please create an account or contact us directly. Details about this error have already been recorded to the error log.
plus this in watchdog messagge:
Facebook OAuth could not acquire an access token from Facebook. We queried the following URL:
https://graph.facebook.com/oauth/access_token?client_id=273882556016196&client_secret=**************************
. Facebook's servers returned an error 0:
Hope someone can help me.
Comments
Comment #1
quicksketchI can access that URL just fine and it seems to be returning the expected values. I'm guessing that the error message is indicating that Facebook's authentication servers may have been down (that does happen more regularly than you might expect).
BTW, your posting of that URL in a public forum may have caused your site a significant security risk. You shouldn't ever share your "client_secret" value with anyone, which happens to be a part of that URL. I'd suggest creating a new app to make a new secret code.
Comment #1.0
quicksketchwatchdog
Comment #2
maynardo commentedI'm still getting the same error...
and you're rigth I shouldn't have posted the complete url... so i did create a new app but error remains, you can see it for yourself http://www.salechile.cl in the left bar is the facebook connect block.
Comment #3
maynardo commentedIt's been a couple of days and the error remains the same, so I don't think the facebook servers are my problem, Can you think of anything else that could be happening ?
Comment #4
maynardo commentedI tried deactivating the "email registration" module thinking it could conflict with the facebook username, but nop... the problem persists. My php version is 5.3.10. Please give some Ideas of could be wrong.
Comment #5
quicksketchIf you access the URL you posted above in a browser (putting back in your client_secret), can you see the returned access token? This doesn't seem to be a widespread problem, perhaps it's something unexpected like a blacklisting of your server by Facebook (just guessing here).
Comment #6
maynardo commentedyes, I get : access_token=************************&expires=5158426
Any ideas how could I find out if the server is blacklisted?
Comment #7
quicksketchIt might be useful to temporarily insert debugging code into fboauth module to see exactly what is being returned from Facebook when your server tries to obtain an access token. Install the devel.module and then insert a call to dvm() in fboauth_access_token() like this:
Then try to login through FBOAuth. That will give you the full output of what your server is getting back from Facebook and you can see if Facebook returned something that could be used to determine what's going wrong.
Comment #8
quicksketchOh, of course something that hadn't occurred to me at all. Make sure your server can actually make HTTP requests to other servers. If your server can't make an HTTP request, then it's not going to work with FBOAuth. The drupal_http_request() function that FBOAuth uses internally uses fsock() to connect to other servers. You might check with your hosting provider to confirm that fsock() connections are allowed on your server.
Comment #9
maynardo commentedGreat, thanxs a lot . The problem was in my php.ini since I needed to enable the "extension=openssl.so" . Hope this helps somebody in the future.
Best Regards
Comment #10
quicksketchGreat, glad we figured that one out.
Comment #12
adaddinsaneJust to confirm that I hit the same problem with openssl.so not being enabled - I'm glad someone had the problem before me otherwise it could have been a long hard road. (I would *never* have thought of that.)
Comment #13
dewolfe001 commentedI have openssl and fsock enable I cannot authorize--
{"error":{"message":"This IP can't make requests for that application.","type":"OAuthException","code":5}}
any ideas what I could be missing?
I have registered my app at Facebook and there is something I could be missing there (I doublechecked the IP whitelist, etc.)
Thanks in advance!
Comment #14
maurocampi commentedHi! I have the same problema. I have enabled both openssl and fsock().
I tried restarting my secret api key but the error stills persists.
______________________________________________________________________________________________________________
The Facebook login could not be completed due to an error. Please create an account or contact us directly. Details about this error have already been recorded to the error log.
UBICACIÓN http://www.comunidadrt.com.ar/fboauth/connect?code=xxxxxxxxxxxxxxxxxxxxx...
MENSAJE Facebook OAuth could not acquire an access token from Facebook. We queried the following URL:
https://graph.facebook.com/oauth/access_token?client_id=xxxxxxxxxxxxxxxx...
. Facebook's servers returned an error Connection timed out:
(no data returned)
______________________________________________________________________________________________________________
what can I try?
Comment #14.0
maurocampi commentedremove adress