Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had this error after activating the plugin with wp-cli.
    Deactivating and activating the plugin again via wp admin fixed it.

    The problem is facebook has set a five second timeout on their access token request. The request times out and the form values are not saved.

    I fixed this by increasing the timeout to 10 seconds.

    The code can be found on line 234 in:
    facebook/includes/facebook-php-sdk/class-facebook-wp.php

    try {
       $response = self::handle_response( wp_remote_get( self::$DOMAIN_MAP['graph'] . 'oauth/access_token?' . http_build_query( $params, '', '&' ), array(
    	'redirection' => 0,
    	'httpversion' => '1.1',
    	'timeout' => 5,
    	'headers' => array( 'Connection' => 'close' ),
    	'user-agent' => self::generate_user_agent()
      ) ) );
    
    } catch( WP_FacebookApiException $e ) {
    	return '';
    }

    I just replaced the ‘timeout’ value of 5 with a larger number.

Viewing 2 replies - 1 through 2 (of 2 total)