HTTP 500 Error When Using Global Centralized Facebook
-
ResolvedWhen trying to post to the sites Facebook account by either updating or creating a blog post I get a HTTP 500 error.
I've tried reauthorising the facebook user but with no effect. I have also tried recreating the app with the same results.
I also applied the fix from this thread - http://stackideas.com/support/discussions/500-error-only-when-facebook-integration-is-on.html but it unfortunately did not work.
Looking through the Facebook API documentation, I found that access token expiration should give a HTTP 400 error not a 500. So I did a bit of debugging and found that the HTTP 500 error is being generated by the throwAPIException function in base_facebook.php
(METHOD: commenting out the expression 'throw $e' stopped the HTTP 500 error from being shown)
The error handler is receiving an error not accounted for ('Error validating application'). This error appears to be causing the HTTP 500 error.
(METHOD: I captured this error by printing the contents of $result passed to the throwAPIException function in base_facebook.php)
I will keep digging but any help would be appreciated as I would like to get this fixed.
TIA
/DM
P.S. if you make any mods can you document them as I would love to know what's going on
Subscribed Products:
Accepted Answer
-
Selected answer for this questionHello DeeEmm,
Strange, it looks like the preg_replace method isn't functioning correctly for some reasons as it works for most sites but not your site. I've changed the fix from using preg_replace to the following and it seems to be working fine now.
preg_match( '/expires=(.*)/i', $this->_access_token , $expires ); if( isset( $expires[1]) ) { $this->_access_token = str_ireplace( '&expires=' . $expires[1] , '' , $this->_access_token ); }
4 responses Add a reply
-
Subscribed Products:
-
-
Subscribed Products:
-
Your Response
Please login to reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.